/**
 * TickerPulse - Modern Financial Design System (v3.0)
 * Philosophy: "SIMPLE ON THE SURFACE. POWERFUL UNDERNEATH."
 * 
 * Aesthetic: Clean White Background, Deep Navy Typography, TickerPulse Blue Accent,
 * Soft Shadows, Moderate Rounded Corners, Generous Whitespace, Clear Hierarchy.
 */

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */

:root {
  /* Brand & Core Accents */
  --tp-blue-600: #0284c7;       /* Primary TickerPulse Blue */
  --tp-blue-700: #0369a1;       /* Primary Hover */
  --tp-blue-500: #0ea5e9;       /* Vibrant Blue */
  --tp-blue-50:  #f0f9ff;       /* Blue Tint / Subtle BG */
  --tp-blue-100: #e0f2fe;       /* Blue Light Badge */

  /* Deep Navy & Slate Typography Palette */
  --tp-navy-950: #070e1e;       /* Deepest Navy for Display Headlines */
  --tp-navy-900: #0b132b;       /* Primary High-Contrast Text */
  --tp-slate-800: #1e293b;      /* Strong Secondary Text */
  --tp-slate-600: #475569;      /* Body & Explanatory Text */
  --tp-slate-500: #64748b;      /* Muted Labels & Placeholders */
  --tp-slate-400: #94a3b8;      /* Disabled & Subtle Elements */
  --tp-slate-300: #cbd5e1;      /* Decorative Borders */
  --tp-slate-200: #e2e8f0;      /* Hairline Dividers & Card Borders */
  --tp-slate-100: #f1f5f9;      /* Subtle Fill & Table Headers */
  --tp-slate-50:  #f8fafc;      /* Page Background */
  --tp-white:     #ffffff;      /* Pure White Surface */

  /* Financial Semantics: Clean & Crisp */
  --tp-green-600: #10b981;      /* Positive / Gain / Up Trend */
  --tp-green-700: #059669;      /* Positive Dark Text */
  --tp-green-50:  #ecfdf5;      /* Positive Pill Fill */
  --tp-green-100: #d1fae5;      /* Positive Border */

  --tp-red-600:   #ef4444;      /* Negative / Loss / Down Trend */
  --tp-red-700:   #dc2626;      /* Negative Dark Text */
  --tp-red-50:    #fef2f2;      /* Negative Pill Fill */
  --tp-red-100:   #fee2e2;      /* Negative Border */

  --tp-amber-500: #f59e0b;      /* Warning / Caution */
  --tp-amber-700: #b45309;      /* Warning Dark Text */
  --tp-amber-50:  #fffbeb;      /* Warning Pill Fill */

  /* Semantic Theme Mapping (Default: Clean Crisp Light Financial Mode) */
  --tp-color-primary:         var(--tp-blue-600);
  --tp-color-primary-hover:   var(--tp-blue-700);
  --tp-color-primary-subtle:  var(--tp-blue-50);
  --tp-color-primary-border:  var(--tp-blue-100);

  --tp-color-secondary:       var(--tp-navy-900);
  --tp-color-secondary-hover: var(--tp-slate-800);

  --tp-bg-page:               var(--tp-slate-50);
  --tp-bg-surface:            var(--tp-white);
  --tp-bg-surface-subtle:     var(--tp-slate-100);
  --tp-bg-surface-hover:      #fdfefe;

  --tp-text-primary:          var(--tp-navy-900);
  --tp-text-secondary:        var(--tp-slate-600);
  --tp-text-muted:            var(--tp-slate-500);
  --tp-text-inverse:          var(--tp-white);

  --tp-border-color:          var(--tp-slate-200);
  --tp-border-subtle:         #edf2f7;
  --tp-border-focus:          var(--tp-blue-500);

  --tp-color-positive:        var(--tp-green-600);
  --tp-color-positive-bg:     var(--tp-green-50);
  --tp-color-positive-text:   var(--tp-green-700);

  --tp-color-negative:        var(--tp-red-600);
  --tp-color-negative-bg:     var(--tp-red-50);
  --tp-color-negative-text:   var(--tp-red-700);

  --tp-color-warning:         var(--tp-amber-500);
  --tp-color-warning-bg:      var(--tp-amber-50);
  --tp-color-warning-text:    var(--tp-amber-700);

  /* Soft Multi-Tier Elevation Shadows (Minimal & Non-Muddy) */
  --tp-shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --tp-shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --tp-shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --tp-shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.07), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --tp-shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);

  /* Moderate Rounded Corners (Clean & Modern) */
  --tp-radius-xs: 4px;
  --tp-radius-sm: 6px;
  --tp-radius-md: 10px;
  --tp-radius-lg: 14px;
  --tp-radius-xl: 20px;
  --tp-radius-full: 9999px;

  /* Systematic 4px Spacing Scale */
  --tp-space-1:  0.25rem;  /* 4px */
  --tp-space-2:  0.5rem;   /* 8px */
  --tp-space-3:  0.75rem;  /* 12px */
  --tp-space-4:  1rem;     /* 16px */
  --tp-space-5:  1.25rem;  /* 20px */
  --tp-space-6:  1.5rem;   /* 24px */
  --tp-space-8:  2rem;     /* 32px */
  --tp-space-10: 2.5rem;   /* 40px */
  --tp-space-12: 3rem;     /* 48px */
  --tp-space-16: 4rem;     /* 64px */

  /* Typography Stack */
  --tp-font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --tp-font-body:    'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --tp-font-mono:    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;

  /* Predictable Micro-Transitions */
  --tp-transition-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
  --tp-transition-base:   200ms cubic-bezier(0.16, 1, 0.3, 1);
  --tp-transition-smooth: 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Theme Overrides (Maintains Clean Contrast without Terminal Overload) */
[data-theme="dark"] {
  --tp-bg-page:               #070d18;
  --tp-bg-surface:            #0d1527;
  --tp-bg-surface-subtle:     #131f37;
  --tp-bg-surface-hover:      #172644;

  --tp-text-primary:          #f8fafc;
  --tp-text-secondary:        #cbd5e1;
  --tp-text-muted:            #94a3b8;
  --tp-text-inverse:          #070d18;

  --tp-border-color:          rgba(255, 255, 255, 0.09);
  --tp-border-subtle:         rgba(255, 255, 255, 0.05);

  --tp-color-primary-subtle:  rgba(2, 132, 199, 0.12);
  --tp-color-primary-border:  rgba(2, 132, 199, 0.25);

  --tp-color-positive-bg:     rgba(16, 185, 129, 0.12);
  --tp-color-positive-text:   #34d399;

  --tp-color-negative-bg:     rgba(239, 68, 68, 0.12);
  --tp-color-negative-text:   #f87171;

  --tp-color-warning-bg:      rgba(245, 158, 11, 0.12);
  --tp-color-warning-text:    #fbbf24;

  --tp-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --tp-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.5);
  --tp-shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.6);
  --tp-shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.7);
  --tp-shadow-xl: 0 20px 30px -5px rgba(0, 0, 0, 0.8);
}

/* ==========================================================================
   1.1 LAYOUT & CONTAINERS
   ========================================================================== */

.tp-container {
  width: 100%;
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--tp-space-5, 1.25rem);
  padding-right: var(--tp-space-5, 1.25rem);
}

.tp-section {
  padding-top: var(--tp-space-6, 1.5rem);
  padding-bottom: var(--tp-space-12, 3rem);
}

/* ==========================================================================
   2. TYPOGRAPHY
   ========================================================================== */

.tp-h1, .tp-h2, .tp-h3, .tp-h4, .tp-h5, .tp-h6 {
  font-family: var(--tp-font-heading);
  color: var(--tp-text-primary);
  font-weight: 700;
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: var(--tp-space-3);
  letter-spacing: -0.02em;
}

.tp-h1 { font-size: clamp(2rem, 3.5vw, 2.75rem); font-weight: 800; letter-spacing: -0.03em; }
.tp-h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 800; }
.tp-h3 { font-size: 1.5rem; }
.tp-h4 { font-size: 1.25rem; font-weight: 600; }
.tp-h5 { font-size: 1rem; font-weight: 600; }
.tp-h6 { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.tp-body-lead {
  font-family: var(--tp-font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--tp-text-secondary);
  margin-bottom: var(--tp-space-4);
}

.tp-body {
  font-family: var(--tp-font-body);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--tp-text-secondary);
}

.tp-caption {
  font-family: var(--tp-font-body);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--tp-text-muted);
}

.tp-num {
  font-family: var(--tp-font-body);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.tp-font-mono {
  font-family: var(--tp-font-mono);
  font-size: 0.875rem;
}

/* Section Header Component */
.tp-section-header {
  margin-bottom: var(--tp-space-8);
}

.tp-section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--tp-space-2);
  padding: 0.25rem 0.75rem;
  background: var(--tp-color-primary-subtle);
  color: var(--tp-color-primary);
  border: 1px solid var(--tp-color-primary-border);
  border-radius: var(--tp-radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--tp-space-3);
}

.tp-section-title {
  font-family: var(--tp-font-heading);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--tp-text-primary);
  margin: 0 0 var(--tp-space-2) 0;
  letter-spacing: -0.025em;
}

.tp-section-desc {
  font-size: 1rem;
  color: var(--tp-text-secondary);
  margin: 0;
  max-width: 680px;
  line-height: 1.5;
}

/* ==========================================================================
   3. BUTTONS
   ========================================================================== */

.tp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--tp-space-2);
  font-family: var(--tp-font-body);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.625rem 1.125rem;
  border-radius: var(--tp-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--tp-transition-fast), border-color var(--tp-transition-fast), transform var(--tp-transition-fast), box-shadow var(--tp-transition-fast);
  user-select: none;
  white-space: nowrap;
}

.tp-btn:active {
  transform: scale(0.98);
}

.tp-btn:disabled, .tp-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

/* Primary Button */
.tp-btn-primary {
  background-color: var(--tp-color-primary);
  color: var(--tp-white) !important;
  border-color: var(--tp-color-primary);
  box-shadow: var(--tp-shadow-xs);
}

.tp-btn-primary:hover:not(:disabled) {
  background-color: var(--tp-color-primary-hover);
  border-color: var(--tp-color-primary-hover);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  transform: translateY(-1px);
}

/* Secondary Button */
.tp-btn-secondary {
  background-color: var(--tp-bg-surface);
  color: var(--tp-text-primary) !important;
  border-color: var(--tp-border-color);
  box-shadow: var(--tp-shadow-xs);
}

.tp-btn-secondary:hover:not(:disabled) {
  background-color: var(--tp-bg-surface-subtle);
  border-color: var(--tp-slate-300);
  transform: translateY(-1px);
}

/* Outline Button */
.tp-btn-outline {
  background-color: transparent;
  color: var(--tp-color-primary) !important;
  border-color: var(--tp-color-primary);
}

.tp-btn-outline:hover:not(:disabled) {
  background-color: var(--tp-color-primary-subtle);
  transform: translateY(-1px);
}

/* Ghost Button */
.tp-btn-ghost {
  background-color: transparent;
  color: var(--tp-text-secondary) !important;
  border-color: transparent;
}

.tp-btn-ghost:hover:not(:disabled) {
  background-color: var(--tp-bg-surface-subtle);
  color: var(--tp-text-primary) !important;
}

/* Success Button */
.tp-btn-success {
  background-color: var(--tp-green-600);
  color: var(--tp-white) !important;
  border-color: var(--tp-green-600);
  box-shadow: var(--tp-shadow-xs);
}

.tp-btn-success:hover:not(:disabled) {
  background-color: var(--tp-green-700);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  transform: translateY(-1px);
}

/* Danger Button */
.tp-btn-danger {
  background-color: var(--tp-red-600);
  color: var(--tp-white) !important;
  border-color: var(--tp-red-600);
}

.tp-btn-danger:hover:not(:disabled) {
  background-color: var(--tp-red-700);
  transform: translateY(-1px);
}

/* Button Sizes */
.tp-btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: var(--tp-radius-sm);
}

.tp-btn-md {
  padding: 0.625rem 1.125rem;
  font-size: 0.875rem;
}

.tp-btn-lg {
  padding: 0.8125rem 1.5rem;
  font-size: 1rem;
  border-radius: var(--tp-radius-md);
  font-weight: 700;
}

/* Full Width */
.tp-btn-block {
  width: 100%;
}

/* ==========================================================================
   4. FORM CONTROLS & INPUTS
   ========================================================================== */

.tp-form-group {
  margin-bottom: var(--tp-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--tp-space-2);
}

.tp-label {
  font-family: var(--tp-font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tp-text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tp-input, .tp-select, .tp-textarea {
  width: 100%;
  font-family: var(--tp-font-body);
  font-size: 0.9375rem;
  color: var(--tp-text-primary);
  background-color: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-md);
  padding: 0.625rem 0.875rem;
  line-height: 1.5;
  transition: border-color var(--tp-transition-fast), box-shadow var(--tp-transition-fast), background-color var(--tp-transition-fast);
  box-sizing: border-box;
}

.tp-input:focus, .tp-select:focus, .tp-textarea:focus {
  outline: none;
  border-color: var(--tp-color-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.tp-input::placeholder, .tp-textarea::placeholder {
  color: var(--tp-text-muted);
}

.tp-input-error {
  border-color: var(--tp-red-600) !important;
}

.tp-input-error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.tp-helper-text {
  font-size: 0.75rem;
  color: var(--tp-text-muted);
  margin-top: 0.25rem;
}

.tp-error-text {
  font-size: 0.75rem;
  color: var(--tp-red-600);
  font-weight: 500;
  margin-top: 0.25rem;
}

/* Search Bar Component */
.tp-search-bar {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background-color: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-lg);
  padding: 0.35rem 0.75rem;
  box-shadow: var(--tp-shadow-xs);
  transition: all var(--tp-transition-fast);
}

.tp-search-bar:focus-within {
  border-color: var(--tp-color-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12), var(--tp-shadow-sm);
}

.tp-search-icon {
  color: var(--tp-text-muted);
  display: flex;
  align-items: center;
  margin-right: var(--tp-space-2);
  flex-shrink: 0;
}

.tp-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--tp-font-body);
  font-size: 0.9375rem;
  color: var(--tp-text-primary);
  outline: none;
  padding: 0.35rem 0;
}

.tp-kbd-badge {
  background-color: var(--tp-bg-surface-subtle);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-xs);
  color: var(--tp-text-muted);
  font-family: var(--tp-font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  line-height: 1;
  user-select: none;
}

/* ==========================================================================
   5. CARDS & SURFACES
   ========================================================================== */

.tp-card {
  background-color: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-lg);
  box-shadow: var(--tp-shadow-xs);
  transition: border-color var(--tp-transition-base), box-shadow var(--tp-transition-base), transform var(--tp-transition-base);
  overflow: hidden;
}

.tp-card-interactive {
  cursor: pointer;
}

.tp-card-interactive:hover {
  border-color: var(--tp-slate-300);
  box-shadow: var(--tp-shadow-md);
  transform: translateY(-2px);
}

[data-theme="dark"] .tp-card-interactive:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.tp-card-header {
  padding: var(--tp-space-5) var(--tp-space-6);
  border-bottom: 1px solid var(--tp-border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tp-card-title {
  font-family: var(--tp-font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--tp-text-primary);
  margin: 0;
}

.tp-card-body {
  padding: var(--tp-space-6);
}

.tp-card-footer {
  padding: var(--tp-space-4) var(--tp-space-6);
  border-top: 1px solid var(--tp-border-subtle);
  background-color: var(--tp-bg-surface-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   6. MARKET CARDS (STOCKS, INDICES & CRYPTO)
   ========================================================================== */

.tp-market-card {
  background-color: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-md);
  padding: var(--tp-space-4);
  box-shadow: var(--tp-shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--tp-transition-fast);
  text-decoration: none;
  color: inherit;
}

.tp-market-card:hover {
  border-color: var(--tp-color-primary);
  box-shadow: var(--tp-shadow-sm);
  transform: translateY(-1px);
}

.tp-market-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--tp-space-3);
}

.tp-symbol-badge {
  font-family: var(--tp-font-heading);
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--tp-text-primary);
  letter-spacing: -0.01em;
}

.tp-market-card-name {
  font-size: 0.75rem;
  color: var(--tp-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.tp-market-card-price {
  font-family: var(--tp-font-body);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tp-text-primary);
  line-height: 1.1;
  margin-bottom: var(--tp-space-1);
}

.tp-market-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

/* ==========================================================================
   7. BADGES & TREND INDICATORS
   ========================================================================== */

.tp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--tp-radius-sm);
  font-family: var(--tp-font-body);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.tp-badge-pill {
  border-radius: var(--tp-radius-full);
  padding: 0.25rem 0.65rem;
}

.tp-badge-success {
  background-color: var(--tp-color-positive-bg);
  color: var(--tp-color-positive-text);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.tp-badge-danger {
  background-color: var(--tp-color-negative-bg);
  color: var(--tp-color-negative-text);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.tp-badge-warning {
  background-color: var(--tp-color-warning-bg);
  color: var(--tp-color-warning-text);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.tp-badge-info {
  background-color: var(--tp-blue-50);
  color: var(--tp-blue-700);
  border: 1px solid var(--tp-blue-100);
}

[data-theme="dark"] .tp-badge-info {
  background-color: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
  border-color: rgba(2, 132, 199, 0.3);
}

.tp-badge-neutral {
  background-color: var(--tp-bg-surface-subtle);
  color: var(--tp-text-secondary);
  border: 1px solid var(--tp-border-color);
}

/* Clean Financial Trend Pills */
.tp-trend-up, .tp-trend-down {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--tp-radius-xs);
  font-family: var(--tp-font-body);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.tp-trend-up {
  background-color: var(--tp-color-positive-bg);
  color: var(--tp-color-positive-text);
}

.tp-trend-down {
  background-color: var(--tp-color-negative-bg);
  color: var(--tp-color-negative-text);
}

.tp-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.tp-dot-live {
  background-color: var(--tp-green-600);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

/* ==========================================================================
   8. DATA TABLES
   ========================================================================== */

.tp-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--tp-radius-lg);
  border: 1px solid var(--tp-border-color);
  background-color: var(--tp-bg-surface);
  box-shadow: var(--tp-shadow-xs);
}

.tp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-family: var(--tp-font-body);
  font-size: 0.875rem;
}

.tp-table th {
  background-color: var(--tp-bg-surface-subtle);
  color: var(--tp-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--tp-space-3) var(--tp-space-4);
  border-bottom: 1px solid var(--tp-border-color);
  white-space: nowrap;
}

.tp-table td {
  padding: var(--tp-space-4);
  border-bottom: 1px solid var(--tp-border-subtle);
  color: var(--tp-text-primary);
  vertical-align: middle;
}

.tp-table tbody tr {
  transition: background-color var(--tp-transition-fast);
}

.tp-table tbody tr:hover {
  background-color: var(--tp-bg-surface-subtle);
}

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

.tp-table-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* ==========================================================================
   9. TABS & SEGMENTED CONTROLS
   ========================================================================== */

/* Line Tabs */
.tp-tabs-line {
  display: flex;
  align-items: center;
  gap: var(--tp-space-6);
  border-bottom: 1px solid var(--tp-border-color);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tp-tab-line-item {
  padding: var(--tp-space-3) var(--tp-space-1);
  font-family: var(--tp-font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tp-text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--tp-transition-fast);
}

.tp-tab-line-item:hover {
  color: var(--tp-text-primary);
}

.tp-tab-line-item.active {
  color: var(--tp-color-primary);
  border-bottom-color: var(--tp-color-primary);
  font-weight: 700;
}

/* Pill Tabs */
.tp-tabs-pills {
  display: inline-flex;
  background-color: var(--tp-bg-surface-subtle);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-md);
  padding: 0.25rem;
  gap: 0.25rem;
}

.tp-tab-pill-item {
  padding: 0.35rem 0.85rem;
  font-family: var(--tp-font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tp-text-secondary);
  border-radius: var(--tp-radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--tp-transition-fast);
}

.tp-tab-pill-item:hover {
  color: var(--tp-text-primary);
}

.tp-tab-pill-item.active {
  background-color: var(--tp-bg-surface);
  color: var(--tp-color-primary);
  font-weight: 700;
  box-shadow: var(--tp-shadow-xs);
}

/* ==========================================================================
   10. MODALS & OVERLAYS
   ========================================================================== */

.tp-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(7, 14, 30, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--tp-space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tp-transition-base);
}

.tp-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.tp-modal-dialog {
  background-color: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-xl);
  box-shadow: var(--tp-shadow-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.96) translateY(10px);
  transition: transform var(--tp-transition-base);
}

.tp-modal-backdrop.active .tp-modal-dialog {
  transform: scale(1) translateY(0);
}

.tp-modal-header {
  padding: var(--tp-space-5) var(--tp-space-6);
  border-bottom: 1px solid var(--tp-border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tp-modal-title {
  font-family: var(--tp-font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tp-text-primary);
  margin: 0;
}

.tp-modal-close {
  background: transparent;
  border: none;
  color: var(--tp-text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--tp-radius-xs);
}

.tp-modal-close:hover {
  color: var(--tp-text-primary);
  background-color: var(--tp-bg-surface-subtle);
}

.tp-modal-body {
  padding: var(--tp-space-6);
}

.tp-modal-footer {
  padding: var(--tp-space-4) var(--tp-space-6);
  border-top: 1px solid var(--tp-border-subtle);
  background-color: var(--tp-bg-surface-subtle);
  display: flex;
  justify-content: flex-end;
  gap: var(--tp-space-3);
}

/* ==========================================================================
   11. TOAST NOTIFICATIONS
   ========================================================================== */

.tp-toast-container {
  position: fixed;
  bottom: var(--tp-space-6);
  right: var(--tp-space-6);
  display: flex;
  flex-direction: column;
  gap: var(--tp-space-2);
  z-index: 1100;
  max-width: 380px;
  width: 100%;
  pointer-events: none;
}

.tp-toast {
  pointer-events: auto;
  background-color: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-md);
  box-shadow: var(--tp-shadow-lg);
  padding: var(--tp-space-3) var(--tp-space-4);
  display: flex;
  align-items: center;
  gap: var(--tp-space-3);
  font-family: var(--tp-font-body);
  font-size: 0.875rem;
  color: var(--tp-text-primary);
  animation: tpSlideIn 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tpSlideIn {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.tp-toast-success { border-left: 4px solid var(--tp-green-600); }
.tp-toast-error   { border-left: 4px solid var(--tp-red-600); }
.tp-toast-warning { border-left: 4px solid var(--tp-amber-500); }
.tp-toast-info    { border-left: 4px solid var(--tp-blue-600); }

/* ==========================================================================
   12. LOADING, SKELETON & EMPTY STATES
   ========================================================================== */

/* Spinner */
.tp-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--tp-border-color);
  border-top-color: var(--tp-color-primary);
  border-radius: 50%;
  animation: tpSpin 0.6s linear infinite;
  display: inline-block;
}

@keyframes tpSpin {
  to { transform: rotate(360deg); }
}

/* Skeleton Loaders */
.tp-skeleton {
  background: linear-gradient(90deg, var(--tp-bg-surface-subtle) 25%, var(--tp-border-subtle) 50%, var(--tp-bg-surface-subtle) 75%);
  background-size: 200% 100%;
  animation: tpSkeletonPulse 1.5s ease-in-out infinite;
  border-radius: var(--tp-radius-xs);
}

@keyframes tpSkeletonPulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.tp-skeleton-text {
  height: 14px;
  margin-bottom: 0.5rem;
  border-radius: var(--tp-radius-xs);
}

.tp-skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: 0.75rem;
  border-radius: var(--tp-radius-sm);
}

.tp-skeleton-rect {
  height: 80px;
  width: 100%;
  border-radius: var(--tp-radius-md);
}

/* Empty State Component */
.tp-empty-state {
  text-align: center;
  padding: var(--tp-space-12) var(--tp-space-6);
  border: 1px dashed var(--tp-border-color);
  border-radius: var(--tp-radius-xl);
  background-color: var(--tp-bg-surface);
}

.tp-empty-icon {
  font-size: 2.5rem;
  margin-bottom: var(--tp-space-3);
  color: var(--tp-text-muted);
}

.tp-empty-title {
  font-family: var(--tp-font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--tp-text-primary);
  margin-bottom: var(--tp-space-2);
}

.tp-empty-desc {
  font-size: 0.875rem;
  color: var(--tp-text-secondary);
  max-width: 420px;
  margin: 0 auto var(--tp-space-5);
  line-height: 1.5;
}

.tp-alert {
  padding: var(--tp-space-4) var(--tp-space-5);
  border-radius: var(--tp-radius-md);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: var(--tp-space-3);
  margin-bottom: var(--tp-space-4);
  line-height: 1.5;
}

.tp-alert-danger {
  background-color: var(--tp-color-negative-bg);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--tp-color-negative-text);
}

.tp-alert-success {
  background-color: var(--tp-color-positive-bg);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--tp-color-positive-text);
}

.tp-alert-warning {
  background-color: var(--tp-color-warning-bg);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--tp-color-warning-text);
}

.tp-alert-info {
  background-color: var(--tp-blue-50);
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: var(--tp-blue-700);
}

[data-theme="dark"] .tp-alert-info {
  background-color: rgba(2, 132, 199, 0.12);
  color: #38bdf8;
  border-color: rgba(2, 132, 199, 0.3);
}

/* ==========================================================================
   13. DROPDOWNS
   ========================================================================== */

.tp-dropdown-container {
  position: relative;
  display: inline-block;
}

.tp-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background-color: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-md);
  box-shadow: var(--tp-shadow-lg);
  min-width: 200px;
  padding: 0.35rem 0;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all var(--tp-transition-fast);
}

.tp-dropdown-container:hover .tp-dropdown-menu,
.tp-dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tp-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--tp-space-3);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--tp-text-secondary);
  text-decoration: none;
  transition: background-color var(--tp-transition-fast), color var(--tp-transition-fast);
}

.tp-dropdown-item:hover {
  background-color: var(--tp-bg-surface-subtle);
  color: var(--tp-text-primary);
}

.tp-dropdown-divider {
  height: 1px;
  background-color: var(--tp-border-subtle);
  margin: 0.35rem 0;
}

/* ==========================================================================
   14. RESPONSIVE GRID HELPERS
   ========================================================================== */

.tp-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--tp-space-4); }
.tp-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--tp-space-4); }
.tp-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--tp-space-4); }

@media (max-width: 1024px) {
  .tp-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .tp-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .tp-grid-4, .tp-grid-3, .tp-grid-2 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   MODERN FINTECH HEADER & TOP STATUS STRIP
   ========================================================================== */

/* 1. Thinner, Cleaner Live Market Status Strip */
.market-ticker-wrapper {
  height: 31px !important;
  background: #ffffff !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85) !important;
  width: 100%;
  max-width: 100vw;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 910;
  overflow: hidden;
  user-select: none;
  transition: background-color var(--tp-transition-fast), border-color var(--tp-transition-fast);
}

[data-theme="dark"] .market-ticker-wrapper {
  background: #080d1a !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.ticker-pinned-session {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 0.85rem;
  height: 100%;
  background: rgba(241, 245, 249, 0.85);
  border-right: 1px solid rgba(226, 232, 240, 0.85);
  flex-shrink: 0;
  z-index: 5;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #059669;
  text-transform: uppercase;
  white-space: nowrap;
}

[data-theme="dark"] .ticker-pinned-session {
  background: rgba(15, 23, 42, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  color: #34d399;
}

.ticker-pinned-session .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
  animation: pulseGlow 2s infinite;
  display: inline-block;
  flex-shrink: 0;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.725rem;
  color: var(--tp-text-secondary);
  padding: 0 0.85rem;
  text-decoration: none;
  border-right: 1px solid rgba(226, 232, 240, 0.6);
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
  height: 31px;
}

[data-theme="dark"] .ticker-item {
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  color: #94a3b8;
}

.ticker-item:hover {
  color: var(--tp-text-primary);
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .ticker-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.ticker-badge {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.05rem 0.32rem;
  border-radius: 3px;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.ticker-name {
  font-weight: 600;
  color: var(--tp-text-primary);
  font-size: 0.725rem;
}

.ticker-val {
  font-family: var(--tp-font-mono, 'Plus Jakarta Sans', monospace);
  font-weight: 600;
  font-size: 0.725rem;
  color: var(--tp-text-primary);
}

.ticker-pinned-action {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 0.85rem;
  background: rgba(241, 245, 249, 0.85);
  border-left: 1px solid rgba(226, 232, 240, 0.85);
  flex-shrink: 0;
  z-index: 5;
}

[data-theme="dark"] .ticker-pinned-action {
  background: rgba(15, 23, 42, 0.95);
  border-left: 1px solid rgba(255, 255, 255, 0.07);
}

.ticker-all-markets-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #2563eb;
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

[data-theme="dark"] .ticker-all-markets-link {
  color: #38bdf8;
}

.ticker-all-markets-link:hover {
  color: #1d4ed8;
}

[data-theme="dark"] .ticker-all-markets-link:hover {
  color: #7dd3fc;
}

/* 2. Main Sticky Header (Compact 56px, Modern SaaS Terminal Style) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000 !important;
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85) !important;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.03), 0 1px 2px -1px rgba(15, 23, 42, 0.02);
  transition: background-color var(--tp-transition-fast), border-color var(--tp-transition-fast);
  width: 100%;
}

[data-theme="dark"] .site-header {
  background: rgba(11, 17, 32, 0.92) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
}

.tp-nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* Brand Anchor */
.tp-header-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 0.35rem;
}

.tp-brand-img-wrap {
  display: flex;
  align-items: center;
  line-height: 1;
}

.tp-brand-img-wrap .brand-logo-img {
  height: 26px;
  width: auto;
  max-width: 130px;
  display: block;
  object-fit: contain;
}

.tp-brand-tagline {
  font-family: var(--tp-font-body);
  font-size: 0.58rem;
  color: var(--tp-text-muted);
  line-height: 1.1;
  margin-top: 2px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* 3. Primary Horizontal 6-Pillar Navigation */
.tp-nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.15rem;
}

.tp-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 56px;
}

.tp-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.38rem 0.65rem;
  border-radius: 6px;
  font-family: var(--tp-font-body);
  font-size: 0.835rem;
  font-weight: 500;
  color: var(--tp-text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  position: relative;
}

.tp-nav-link:hover {
  color: var(--tp-text-primary);
  background-color: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .tp-nav-link:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
}

/* Active State for Trading (Clean Bottom Indicator) */
.tp-nav-link.tp-nav-link-active {
  color: #2563eb !important;
  font-weight: 600;
  background: transparent;
}

[data-theme="dark"] .tp-nav-link.tp-nav-link-active {
  color: #38bdf8 !important;
}

.tp-nav-link.tp-nav-link-active::after {
  content: '';
  position: absolute;
  bottom: 0px;
  left: 0.65rem;
  right: 0.65rem;
  height: 2.5px;
  background: #2563eb;
  border-radius: 3px 3px 0 0;
}

[data-theme="dark"] .tp-nav-link.tp-nav-link-active::after {
  background: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.tp-nav-arrow {
  font-size: 0.55rem;
  color: var(--tp-text-muted);
  transition: transform 0.2s ease, color 0.15s ease;
  margin-left: 1px;
}

.tp-nav-item:hover .tp-nav-arrow,
.tp-nav-item.is-open .tp-nav-arrow {
  transform: rotate(180deg);
  color: #2563eb;
}

[data-theme="dark"] .tp-nav-item:hover .tp-nav-arrow,
[data-theme="dark"] .tp-nav-item.is-open .tp-nav-arrow {
  color: #38bdf8;
}

/* Nav Dropdowns */
.tp-nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: 12px;
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
  min-width: 280px;
  padding: 0.5rem;
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity var(--tp-transition-fast), transform var(--tp-transition-fast), visibility var(--tp-transition-fast);
}

[data-theme="dark"] .tp-nav-dropdown {
  box-shadow: 0 20px 40px -4px rgba(0, 0, 0, 0.65), 0 0 1px 1px rgba(255, 255, 255, 0.08);
}

.tp-nav-dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.tp-nav-item:hover .tp-nav-dropdown,
.tp-nav-item.is-open .tp-nav-dropdown,
.tp-nav-item:focus-within .tp-nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.tp-dropdown-link {
  display: flex;
  align-items: flex-start;
  gap: var(--tp-space-3);
  padding: 0.55rem 0.7rem;
  border-radius: var(--tp-radius-md);
  text-decoration: none;
  transition: background-color var(--tp-transition-fast);
}

.tp-dropdown-link:hover {
  background-color: var(--tp-bg-surface-subtle);
}

.tp-dropdown-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  line-height: 1.2;
  margin-top: 1px;
}

.tp-dropdown-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tp-dropdown-heading {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--tp-text-primary);
  line-height: 1.25;
}

.tp-dropdown-subtext {
  font-size: 0.725rem;
  color: var(--tp-text-muted);
  line-height: 1.35;
}

/* 4. Right Nav Actions (Search, AI, Theme, Login, Sign Up) */
.tp-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Compact Rounded Search Button */
.tp-nav-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background-color: var(--tp-bg-surface-subtle, #f8fafc);
  border: 1px solid var(--tp-border-color, #e2e8f0);
  border-radius: 8px;
  height: 34px;
  max-width: 215px;
  min-width: 175px;
  padding: 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--tp-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-theme="dark"] .tp-nav-search-btn {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.tp-nav-search-btn:hover {
  border-color: #2563eb;
  color: var(--tp-text-primary);
  background-color: var(--tp-bg-surface);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

[data-theme="dark"] .tp-nav-search-btn:hover {
  border-color: #38bdf8;
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.12);
}

.tp-nav-search-btn svg {
  color: var(--tp-text-muted);
  flex-shrink: 0;
}

.tp-search-text {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tp-search-kbd {
  font-size: 0.625rem;
  padding: 1.5px 4.5px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  font-family: var(--tp-font-mono, monospace);
  font-weight: 600;
  color: var(--tp-text-muted);
  flex-shrink: 0;
}

[data-theme="dark"] .tp-search-kbd {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Compact Ask AI CTA */
.tp-nav-ai-btn {
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 8px !important;
  height: 34px !important;
  padding: 0 0.85rem !important;
  font-family: var(--tp-font-body) !important;
  font-weight: 600 !important;
  font-size: 0.8rem !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.22);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tp-nav-ai-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  filter: brightness(1.08);
}

/* Circular Theme Toggle */
.tp-theme-toggle {
  background: transparent;
  border: 1px solid var(--tp-border-color, #e2e8f0);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--tp-text-primary);
  transition: all 0.15s ease;
  flex-shrink: 0;
}

[data-theme="dark"] .tp-theme-toggle {
  border-color: rgba(255, 255, 255, 0.1);
}

.tp-theme-toggle:hover {
  background-color: var(--tp-bg-surface-subtle);
  border-color: var(--tp-border-strong, #cbd5e1);
}

[data-theme="dark"] .tp-theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Modernized Login & Sign Up */
.tp-nav-login-btn {
  height: 34px;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tp-text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.15s ease;
  background: transparent;
  border: 1px solid transparent;
  white-space: nowrap;
}

.tp-nav-login-btn:hover {
  color: var(--tp-text-primary);
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .tp-nav-login-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
}

.tp-nav-signup-btn {
  height: 34px;
  padding: 0 0.95rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 8px;
  background: #2563eb;
  color: #ffffff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tp-nav-signup-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35);
  color: #ffffff;
}

.tp-user-pill-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--tp-radius-full);
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  cursor: pointer;
  color: var(--tp-text-primary);
  transition: all var(--tp-transition-fast);
}

.tp-user-pill-btn:hover,
.user-profile-menu.is-open .tp-user-pill-btn {
  background-color: var(--tp-bg-surface-subtle);
  border-color: var(--tp-color-primary);
}

.user-profile-menu {
  position: relative;
}

.user-profile-menu:hover .tp-nav-dropdown,
.user-profile-menu.is-open .tp-nav-dropdown,
.user-profile-menu:focus-within .tp-nav-dropdown {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

.tp-logout-btn {
  transition: all var(--tp-transition-fast);
}

.tp-logout-btn:hover {
  background: rgba(239, 68, 68, 0.16) !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
  transform: translateX(2px);
}

.tp-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tp-user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--tp-text-primary);
}

.tp-mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-md);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--tp-text-primary);
  cursor: pointer;
  transition: all var(--tp-transition-fast);
}

.tp-mobile-menu-btn:hover {
  background-color: var(--tp-bg-surface-subtle);
}

/* Mobile Responsive Adjustments */
@media (max-width: 1024px) {
  .tp-nav-list {
    display: none !important;
  }
  .tp-desktop-only {
    display: none !important;
  }
  .tp-mobile-menu-btn {
    display: inline-flex !important;
  }
  .tp-search-text, .tp-search-kbd {
    display: none;
  }
  .tp-nav-search-btn {
    padding: 0.45rem 0.65rem;
    border-radius: var(--tp-radius-md);
  }
}

/* Clean Mobile Drawer */
.tp-drawer-group {
  margin-bottom: var(--tp-space-4);
}

.tp-drawer-heading {
  font-family: var(--tp-font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tp-text-muted);
  padding: 0 var(--tp-space-2) var(--tp-space-2);
}

.tp-drawer-link {
  display: flex;
  align-items: center;
  gap: var(--tp-space-3);
  padding: 0.625rem var(--tp-space-3);
  border-radius: var(--tp-radius-md);
  color: var(--tp-text-primary);
  text-decoration: none;
  font-family: var(--tp-font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: background-color var(--tp-transition-fast);
}

.tp-drawer-link:hover {
  background-color: var(--tp-bg-surface-subtle);
  color: var(--tp-color-primary);
}

.tp-drawer-icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

/* Mobile Drawer Accordion Navigation */
.tp-drawer-accordion {
  border-bottom: 1px solid var(--tp-border-subtle);
  padding: 0.25rem 0;
}

.tp-drawer-accordion summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.5rem;
  font-family: var(--tp-font-heading);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--tp-text-primary);
  cursor: pointer;
  border-radius: var(--tp-radius-md);
  transition: all var(--tp-transition-fast);
  user-select: none;
}

.tp-drawer-accordion summary::-webkit-details-marker {
  display: none;
}

.tp-drawer-accordion summary:hover {
  background-color: var(--tp-bg-surface-subtle);
  color: var(--tp-color-primary);
}

.tp-drawer-accordion[open] > summary {
  color: var(--tp-color-primary);
}

.tp-drawer-chevron {
  font-size: 0.75rem;
  color: var(--tp-text-muted);
  transition: transform var(--tp-transition-fast);
}

.tp-drawer-accordion[open] .tp-drawer-chevron {
  transform: rotate(180deg);
  color: var(--tp-color-primary);
}

.tp-drawer-direct-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.5rem;
  font-family: var(--tp-font-heading);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--tp-text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--tp-border-subtle);
  border-radius: var(--tp-radius-md);
  transition: all var(--tp-transition-fast);
}

.tp-drawer-direct-link:hover {
  background-color: var(--tp-bg-surface-subtle);
  color: var(--tp-color-primary);
}

.tp-drawer-direct-link .tp-drawer-arrow {
  font-size: 0.85rem;
  color: var(--tp-text-muted);
  transition: transform var(--tp-transition-fast), color var(--tp-transition-fast);
}

.tp-drawer-direct-link:hover .tp-drawer-arrow {
  transform: translateX(3px);
  color: var(--tp-color-primary);
}

.tp-drawer-direct-link.active {
  background-color: var(--tp-color-primary-subtle);
  color: var(--tp-color-primary);
}

.tp-drawer-direct-link.active .tp-drawer-arrow {
  transform: translateX(3px);
  color: var(--tp-color-primary);
}

.tp-drawer-sublist {
  padding-left: 0.75rem;
  margin: 0.25rem 0 0.5rem 0.5rem;
  border-left: 2px solid var(--tp-border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.tp-drawer-sublink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--tp-radius-md);
  font-family: var(--tp-font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--tp-text-secondary);
  text-decoration: none;
  transition: all var(--tp-transition-fast);
}

.tp-drawer-sublink:hover {
  color: var(--tp-color-primary);
  background-color: var(--tp-bg-surface-subtle);
}

.tp-drawer-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: var(--tp-radius-full);
  letter-spacing: 0.04em;
}

/* ==========================================================================
   16. HOMEPAGE REDESIGN STYLES (PHASE 4)
   ========================================================================== */

/* Section Layouts */
.tp-home-section {
  padding: clamp(3rem, 6vw, 5rem) 0;
  border-top: 1px solid var(--tp-border-subtle);
}

.tp-home-section:first-of-type {
  border-top: none;
}

.tp-home-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.tp-home-section-title {
  font-family: var(--tp-font-heading);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--tp-text-primary);
  line-height: 1.2;
  margin: 0;
}

.tp-home-section-desc {
  font-family: var(--tp-font-body);
  font-size: 0.95rem;
  color: var(--tp-text-secondary);
  margin: 0.35rem 0 0 0;
}

/* Hero Section */
.tp-home-hero {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
  position: relative;
}

.tp-home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--tp-color-primary-subtle);
  color: var(--tp-color-primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--tp-radius-full);
  padding: 0.35rem 0.95rem;
  font-family: var(--tp-font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.tp-home-hero-title {
  font-family: var(--tp-font-heading);
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--tp-text-primary);
  margin: 0 auto 1.25rem;
  max-width: 860px;
}

.tp-home-hero-subtitle {
  font-family: var(--tp-font-body);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: var(--tp-text-secondary);
  margin: 0 auto 2.25rem;
  max-width: 680px;
}

.tp-home-hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Large Search Centerpiece */
.tp-home-search-box {
  max-width: 640px;
  margin: 2.5rem auto 1rem;
  position: relative;
}

.tp-home-search-input-wrap {
  display: flex;
  align-items: center;
  background-color: var(--tp-bg-surface);
  border: 1.5px solid var(--tp-border-color);
  border-radius: var(--tp-radius-full);
  padding: 0.35rem 0.45rem 0.35rem 1.25rem;
  box-shadow: var(--tp-shadow-md);
  transition: all var(--tp-transition-fast);
}

.tp-home-search-input-wrap:focus-within {
  border-color: var(--tp-color-primary);
  box-shadow: 0 0 0 4px var(--tp-color-primary-subtle), var(--tp-shadow-lg);
}

.tp-home-search-input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  font-family: var(--tp-font-body);
  font-size: 0.95rem;
  color: var(--tp-text-primary);
  padding: 0.4rem 0.5rem;
}

.tp-home-search-input::placeholder {
  color: var(--tp-text-muted);
}

.tp-home-suggestions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
}

.tp-suggestion-pill {
  background: var(--tp-bg-surface-subtle);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-full);
  padding: 0.25rem 0.75rem;
  font-family: var(--tp-font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tp-text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--tp-transition-fast);
}

.tp-suggestion-pill:hover {
  background: var(--tp-bg-surface);
  border-color: var(--tp-color-primary);
  color: var(--tp-color-primary);
  box-shadow: var(--tp-shadow-xs);
}

/* Market Snapshot Grid */
.tp-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.tp-snapshot-card {
  background-color: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-lg);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--tp-transition-fast);
  box-shadow: var(--tp-shadow-xs);
}

.tp-snapshot-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--tp-shadow-md);
  border-color: var(--tp-border-strong);
}

.tp-snapshot-name {
  font-family: var(--tp-font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--tp-text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.tp-snapshot-val {
  font-family: var(--tp-font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--tp-text-primary);
  line-height: 1.2;
}

.tp-snapshot-change {
  font-family: var(--tp-font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* 4 Action Cards Grid */
.tp-action-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}

.tp-action-card {
  background-color: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-xl);
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--tp-transition-fast);
  box-shadow: var(--tp-shadow-xs);
}

.tp-action-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tp-shadow-lg);
  border-color: var(--tp-color-primary);
}

.tp-action-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--tp-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

.tp-action-title {
  font-family: var(--tp-font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--tp-text-primary);
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.tp-action-desc {
  font-family: var(--tp-font-body);
  font-size: 0.875rem;
  color: var(--tp-text-secondary);
  line-height: 1.5;
  margin: 0;
}

.tp-action-link-text {
  margin-top: 1.5rem;
  font-family: var(--tp-font-body);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--tp-color-primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Popular Stocks Table/Card */
.tp-stocks-card {
  background-color: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-xl);
  overflow: hidden;
  box-shadow: var(--tp-shadow-xs);
}

.tp-stocks-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--tp-border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tp-stocks-tabs {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  gap: 0.35rem;
  background: var(--tp-bg-surface-subtle);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-full);
  padding: 0.25rem;
}

.tp-stocks-tab-btn {
  background: transparent;
  border: none;
  padding: 0.35rem 0.95rem;
  border-radius: var(--tp-radius-full);
  font-family: var(--tp-font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tp-text-muted);
  cursor: pointer;
  transition: all var(--tp-transition-fast);
}

.tp-stocks-tab-btn.active {
  background: var(--tp-bg-surface);
  color: var(--tp-color-primary);
  box-shadow: var(--tp-shadow-xs);
  font-weight: 800;
}

.tp-stocks-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--tp-border-subtle);
  text-decoration: none;
  color: inherit;
  transition: background-color var(--tp-transition-fast);
}

.tp-stocks-row:last-child {
  border-bottom: none;
}

.tp-stocks-row:hover {
  background-color: var(--tp-bg-surface-subtle);
}

/* News Grid */
.tp-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.tp-news-card {
  background-color: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: all var(--tp-transition-fast);
  box-shadow: var(--tp-shadow-xs);
}

.tp-news-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--tp-shadow-md);
  border-color: var(--tp-border-strong);
}

.tp-news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.tp-news-title {
  font-family: var(--tp-font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--tp-text-primary);
  line-height: 1.4;
  margin: 0 0 1rem 0;
}

.tp-news-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--tp-border-subtle);
  padding-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--tp-text-muted);
}

/* Useful Tools Grid */
.tp-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.tp-tool-card {
  background-color: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: all var(--tp-transition-fast);
  box-shadow: var(--tp-shadow-xs);
}

.tp-tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--tp-shadow-md);
  border-color: var(--tp-color-primary);
}

.tp-tool-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.tp-tool-title {
  font-family: var(--tp-font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--tp-text-primary);
  margin: 0 0 0.5rem 0;
}

.tp-tool-desc {
  font-family: var(--tp-font-body);
  font-size: 0.85rem;
  color: var(--tp-text-secondary);
  line-height: 1.5;
  margin: 0 0 1.25rem 0;
}

.tp-tool-action {
  font-family: var(--tp-font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--tp-color-primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Ask TickerPulse AI Box */
.tp-ai-box {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0%, rgba(99, 102, 241, 0.08) 100%);
  border: 1.5px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--tp-radius-2xl);
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--tp-shadow-sm);
}

.tp-ai-title {
  font-family: var(--tp-font-heading);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 900;
  color: var(--tp-text-primary);
  margin: 0 0 0.5rem 0;
}

.tp-ai-subtitle {
  font-family: var(--tp-font-body);
  font-size: 1.05rem;
  color: var(--tp-text-secondary);
  max-width: 580px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

.tp-ai-input-wrap {
  display: flex;
  align-items: center;
  background-color: var(--tp-bg-surface);
  border: 1.5px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--tp-radius-full);
  padding: 0.35rem 0.45rem 0.35rem 1.25rem;
  max-width: 620px;
  margin: 0 auto 1.25rem;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08);
  transition: all var(--tp-transition-fast);
}

.tp-ai-input-wrap:focus-within {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), var(--tp-shadow-md);
}

.tp-ai-input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  font-family: var(--tp-font-body);
  font-size: 0.95rem;
  color: var(--tp-text-primary);
  padding: 0.4rem 0.5rem;
}

.tp-ai-input::placeholder {
  color: var(--tp-text-muted);
}

.tp-ai-prompts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tp-ai-pill {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-full);
  padding: 0.35rem 0.85rem;
  font-family: var(--tp-font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tp-text-secondary);
  cursor: pointer;
  transition: all var(--tp-transition-fast);
}

.tp-ai-pill:hover {
  border-color: #6366f1;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.06);
}

/* Simplified 4-Column Footer */
.tp-footer-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.tp-footer-col-title {
  font-family: var(--tp-font-heading);
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tp-text-primary);
  margin-bottom: 1.25rem;
}

.tp-footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tp-footer-link {
  font-family: var(--tp-font-body);
  font-size: 0.875rem;
  color: var(--tp-text-secondary);
  text-decoration: none;
  transition: color var(--tp-transition-fast);
}

.tp-footer-link:hover {
  color: var(--tp-color-primary);
}

.tp-disclaimer-box {
  padding: 1.5rem;
  background-color: var(--tp-bg-surface-subtle);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-lg);
  margin-bottom: 2.5rem;
  font-family: var(--tp-font-body);
  font-size: 0.75rem;
  color: var(--tp-text-muted);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .tp-footer-grid-4 {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
  }
}

@media (max-width: 480px) {
  .tp-footer-grid-4 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ==========================================================================
   17. MOBILE-FIRST UX OPTIMIZATIONS & BREAKPOINTS (PHASE 5)
   ========================================================================== */

/* Global Overflow Prevention */
html, body {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100vw !important;
}

/* Touch Target Standards (Min 44px) */
.tp-btn,
.tp-nav-search-btn,
.tp-mobile-menu-btn,
.mobile-bottom-item,
.tp-suggestion-pill,
.tp-ai-pill,
.tp-stocks-tab-btn,
.tp-drawer-link,
.tp-drawer-sublink {
  min-height: 44px;
  touch-action: manipulation;
}

/* Mobile Bottom Navigation Bar (Home, Markets, Stocks, Trading, Portfolio, Finance) */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background-color: var(--tp-bg-surface) !important;
  border-top: 1px solid var(--tp-border-color) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  justify-content: space-around;
  align-items: stretch;
  height: calc(56px + env(safe-area-inset-bottom, 0px));
  padding: 0 0.25rem env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.mobile-bottom-item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--tp-text-muted);
  text-decoration: none;
  font-family: var(--tp-font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.25rem 0.15rem;
  transition: color var(--tp-transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform var(--tp-transition-fast);
}

.mobile-bottom-item:hover,
.mobile-bottom-item.active {
  color: var(--tp-color-primary) !important;
}

.mobile-bottom-item.active svg {
  transform: scale(1.1);
}

/* Specific Trading Accent on Bottom Bar */
.mobile-bottom-item.tp-bottom-trading {
  position: relative;
}

.mobile-bottom-item.tp-bottom-trading.active {
  color: var(--tp-color-primary) !important;
}

/* Responsive Rules for Mobile Viewports (<= 768px) */
@media (max-width: 768px) {
  /* Show Mobile Bottom Navigation */
  .mobile-bottom-bar {
    display: flex !important;
  }

  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Floating Ask AI Button (Retired) */
  .floating-ai-btn {
    display: none !important;
  }

  /* Mobile Header Bar (Logo | Search | Ask AI | Menu) */
  .tp-nav-container {
    padding: 0 0.85rem !important;
    height: 54px !important;
    gap: 0.5rem !important;
  }

  .tp-nav-actions {
    gap: 0.35rem !important;
  }

  .tp-nav-search-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
  }

  .tp-nav-ai-btn {
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 0.65rem !important;
    font-size: 0.78rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    white-space: nowrap !important;
    border-radius: 8px !important;
  }

  .tp-mobile-menu-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    background: transparent;
    border: 1px solid var(--tp-border-color);
    color: var(--tp-text-primary);
    cursor: pointer;
  }

  /* Hero Section Spacing */
  .tp-home-hero {
    padding: 2.5rem 0 1.75rem !important;
  }

  .tp-home-hero-badge {
    margin-bottom: 1rem !important;
    font-size: 0.7rem !important;
    padding: 0.3rem 0.8rem !important;
  }

  .tp-home-hero-title {
    font-size: clamp(2.15rem, 8vw, 2.75rem) !important;
    line-height: 1.15 !important;
    margin-bottom: 1rem !important;
  }

  .tp-home-hero-subtitle {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    margin-bottom: 1.5rem !important;
  }

  .tp-home-hero-ctas {
    gap: 0.65rem !important;
    width: 100%;
  }

  .tp-home-hero-ctas .tp-btn {
    flex: 1 1 140px;
    padding: 0.65rem 1rem !important;
    font-size: 0.875rem !important;
    justify-content: center;
  }

  /* Large Search Bar Mobile */
  .tp-home-search-box {
    margin: 1.75rem auto 0.75rem !important;
  }

  .tp-home-search-input-wrap {
    padding: 0.25rem 0.35rem 0.25rem 0.85rem !important;
  }

  .tp-home-search-input {
    font-size: 0.875rem !important;
    padding: 0.4rem 0.35rem !important;
  }

  .tp-home-suggestions {
    gap: 0.35rem !important;
    margin-top: 0.65rem !important;
  }

  .tp-suggestion-pill {
    padding: 0.25rem 0.65rem !important;
    font-size: 0.75rem !important;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  /* Market Snapshot Horizontal Scrollable Carousel */
  .tp-snapshot-grid {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0.75rem !important;
    padding-bottom: 0.65rem !important;
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    scrollbar-width: thin;
  }

  .tp-snapshot-card {
    flex: 0 0 165px !important;
    min-width: 160px !important;
    scroll-snap-align: start;
    padding: 0.95rem 1rem !important;
    border-radius: var(--tp-radius-md) !important;
  }

  .tp-snapshot-name {
    font-size: 0.7rem !important;
    margin-bottom: 0.25rem !important;
  }

  .tp-snapshot-val {
    font-size: 1.15rem !important;
  }

  .tp-snapshot-change {
    font-size: 0.75rem !important;
  }

  /* Quick Actions 2-Column Mobile Grid */
  .tp-action-grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  .tp-action-card {
    padding: 1.15rem 0.95rem !important;
    border-radius: var(--tp-radius-lg) !important;
    min-height: 135px;
  }

  .tp-action-icon-wrap {
    width: 36px !important;
    height: 36px !important;
    font-size: 1.15rem !important;
    margin-bottom: 0.65rem !important;
  }

  .tp-action-title {
    font-size: 0.875rem !important;
    margin-bottom: 0.25rem !important;
    line-height: 1.25 !important;
  }

  .tp-action-desc {
    font-size: 0.75rem !important;
    line-height: 1.35 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .tp-action-link-text {
    margin-top: 0.65rem !important;
    font-size: 0.75rem !important;
  }

  /* Popular Stocks Mobile List */
  .tp-stocks-header {
    padding: 0.85rem 1rem !important;
  }

  .tp-stocks-tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.25rem !important;
    padding: 0.2rem !important;
  }

  .tp-stocks-tabs::-webkit-scrollbar {
    display: none;
  }

  .tp-stocks-tab-btn {
    flex-shrink: 0;
    min-height: 38px;
    padding: 0.35rem 0.75rem !important;
    font-size: 0.78rem !important;
  }

  .tp-stocks-row {
    padding: 0.75rem 1rem !important;
    min-height: 52px;
  }

  .tp-desktop-metric {
    display: none !important;
  }

  /* Useful Tools 2-Column Mobile Grid */
  .tp-tools-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  .tp-tool-card {
    padding: 1.15rem 0.95rem !important;
    border-radius: var(--tp-radius-lg) !important;
    min-height: 135px;
  }

  .tp-tool-icon {
    font-size: 1.4rem !important;
    margin-bottom: 0.4rem !important;
  }

  .tp-tool-title {
    font-size: 0.875rem !important;
    margin-bottom: 0.2rem !important;
  }

  .tp-tool-desc {
    font-size: 0.75rem !important;
    line-height: 1.35 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.65rem !important;
  }

  .tp-tool-action {
    font-size: 0.75rem !important;
  }

  /* News Mobile Compact Cards */
  .tp-news-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .tp-news-card {
    padding: 1rem 1.15rem !important;
    border-radius: var(--tp-radius-md) !important;
  }

  .tp-news-title {
    font-size: 0.9375rem !important;
    line-height: 1.35 !important;
    margin-bottom: 0.5rem !important;
  }

  /* Ask AI Mobile Box */
  .tp-ai-box {
    padding: 1.75rem 1rem !important;
    border-radius: var(--tp-radius-xl) !important;
  }

  .tp-ai-title {
    font-size: 1.5rem !important;
  }

  .tp-ai-subtitle {
    font-size: 0.875rem !important;
    margin-bottom: 1.15rem !important;
  }

  .tp-ai-input-wrap {
    padding: 0.25rem 0.35rem 0.25rem 0.85rem !important;
    max-width: 100%;
  }

  .tp-ai-prompts {
    gap: 0.35rem !important;
  }

  .tp-ai-pill {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.75rem !important;
    min-height: 38px;
  }
}

/* Extra-Small Mobile Devices (<= 350px, e.g. iPhone SE 1st gen 320px) */
@media (max-width: 350px) {
  .tp-nav-container {
    padding: 0 0.5rem !important;
    height: 54px !important;
  }

  .tp-nav-actions {
    gap: 0.25rem !important;
  }

  .brand-logo-img {
    height: 24px !important;
    max-width: 95px !important;
  }

  .tp-nav-search-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
  }

  .tp-nav-ai-btn {
    min-height: 38px !important;
    padding: 0.3rem 0.5rem !important;
    font-size: 0.75rem !important;
  }

  .tp-mobile-menu-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
  }

  .tp-home-hero-title {
    font-size: 1.85rem !important;
  }

  .tp-home-hero-ctas {
    flex-direction: column !important;
  }

  .tp-action-grid-4,
  .tp-tools-grid {
    grid-template-columns: 1fr !important;
  }

  .tp-snapshot-card {
    flex: 0 0 145px !important;
    min-width: 140px !important;
  }

  .mobile-bottom-item svg {
    width: 18px !important;
    height: 18px !important;
  }

  .mobile-bottom-item span {
    font-size: 0.56rem !important;
    letter-spacing: -0.3px;
  }

  .tp-stocks-row {
    padding: 0.65rem 0.65rem !important;
  }
}

/* Tablet Viewport (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .tp-snapshot-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1rem !important;
  }

  .tp-action-grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem !important;
  }

  .tp-tools-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem !important;
  }

  .tp-news-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem !important;
  }

  .tp-home-hero-title {
    font-size: 3rem !important;
  }

  .mobile-bottom-bar {
    display: none !important;
  }

  body {
    padding-bottom: 0 !important;
  }
}

/* Desktop Viewport (>= 1025px) */
@media (min-width: 1025px) {
  .mobile-bottom-bar {
    display: none !important;
  }

  .tp-mobile-menu-btn {
    display: none !important;
  }
}

/* ==========================================================================
   18. MARKETS DASHBOARD DESIGN SYSTEM STYLES (PHASE 6)
   ========================================================================== */

/* Main Markets Page Shell */
.tp-markets-page {
  padding: 1.5rem 0 4rem;
  min-height: calc(100vh - 120px);
}

/* Header & Telemetry */
.tp-markets-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.tp-markets-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--tp-radius-full);
  font-family: var(--tp-font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--tp-color-primary-subtle);
  color: var(--tp-color-primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
  margin-bottom: 0.5rem;
}

.tp-markets-title {
  font-family: var(--tp-font-heading);
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
  font-weight: 900;
  color: var(--tp-text-primary);
  margin: 0 0 0.5rem 0;
  line-height: 1.15;
}

.tp-markets-subtitle {
  font-family: var(--tp-font-body);
  font-size: 0.975rem;
  color: var(--tp-text-secondary);
  margin: 0;
  max-width: 680px;
  line-height: 1.5;
}

.tp-session-card {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-lg);
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: var(--tp-shadow-xs);
  min-width: 220px;
}

/* Horizontal 7-Tab Navigation */
.tp-markets-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.35rem;
  margin-bottom: 2rem;
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-xl);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tp-markets-nav::-webkit-scrollbar {
  display: none;
}

.tp-market-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--tp-radius-lg);
  font-family: var(--tp-font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--tp-text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--tp-transition-fast);
  border: 1px solid transparent;
  min-height: 44px;
  touch-action: manipulation;
}

.tp-market-tab-btn:hover {
  color: var(--tp-text-primary);
  background-color: var(--tp-bg-surface-subtle);
}

.tp-market-tab-btn.active {
  background-color: var(--tp-color-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.tp-market-tab-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: var(--tp-radius-full);
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

/* Priority 6 Benchmark Grid & Cards */
.tp-priority-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.tp-priority-card {
  background: var(--tp-bg-surface);
  border: 1.5px solid var(--tp-border-color);
  border-radius: var(--tp-radius-xl);
  padding: 1.15rem 1.15rem 0.95rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all var(--tp-transition-fast);
  box-shadow: var(--tp-shadow-xs);
  position: relative;
  overflow: hidden;
}

.tp-priority-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--tp-shadow-md);
  border-color: var(--tp-color-primary);
}

.tp-priority-card.is-active-chart {
  border-color: var(--tp-color-primary) !important;
  background: linear-gradient(180deg, var(--tp-color-primary-subtle) 0%, var(--tp-bg-surface) 100%) !important;
  box-shadow: 0 0 0 2px var(--tp-color-primary), var(--tp-shadow-sm) !important;
}

.tp-priority-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.tp-priority-symbol {
  font-family: var(--tp-font-heading);
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--tp-text-primary);
  letter-spacing: 0.02em;
}

.tp-priority-region-pill {
  font-family: var(--tp-font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--tp-radius-full);
  background: var(--tp-bg-surface-subtle);
  color: var(--tp-text-muted);
  border: 1px solid var(--tp-border-subtle);
}

.tp-priority-val {
  font-family: var(--tp-font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--tp-text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.tp-priority-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--tp-border-subtle);
}

.tp-priority-chg-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-family: var(--tp-font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--tp-radius-sm);
}

.tp-priority-chg-pill.is-pos {
  background: rgba(16, 185, 129, 0.12);
  color: var(--tp-color-positive);
}

.tp-priority-chg-pill.is-neg {
  background: rgba(239, 68, 68, 0.12);
  color: var(--tp-color-negative);
}

/* Interactive Benchmark Chart Container */
.tp-market-chart-card {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-2xl);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--tp-shadow-sm);
}

.tp-market-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--tp-border-subtle);
  padding-bottom: 1rem;
}

.tp-chart-title-box {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tp-chart-name {
  font-family: var(--tp-font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--tp-text-primary);
}

.tp-chart-val {
  font-family: var(--tp-font-mono);
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--tp-text-primary);
}

.tp-chart-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tp-chart-pill-btn {
  background: var(--tp-bg-surface-subtle);
  border: 1px solid var(--tp-border-color);
  color: var(--tp-text-secondary);
  padding: 0.35rem 0.85rem;
  border-radius: var(--tp-radius-md);
  font-family: var(--tp-font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--tp-transition-fast);
  min-height: 36px;
}

.tp-chart-pill-btn:hover {
  background: var(--tp-bg-surface);
  color: var(--tp-text-primary);
  border-color: var(--tp-color-primary);
}

.tp-chart-pill-btn.active {
  background: var(--tp-color-primary) !important;
  color: #fff !important;
  border-color: var(--tp-color-primary) !important;
}

.tp-chart-canvas-wrap {
  position: relative;
  width: 100%;
  height: 300px;
}

/* Market Breadth & Institutional Liquidity Strip */
.tp-sentiment-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.tp-sentiment-card {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-xl);
  padding: 1.5rem;
  box-shadow: var(--tp-shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Movers Showcase 3-Column Grid */
.tp-movers-showcase-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.tp-movers-col-card {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-xl);
  padding: 1.25rem;
  box-shadow: var(--tp-shadow-xs);
}

.tp-movers-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--tp-border-subtle);
}

.tp-movers-col-title {
  font-family: var(--tp-font-heading);
  font-size: 1rem;
  font-weight: 800;
  color: var(--tp-text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tp-movers-mini-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.5rem;
  border-radius: var(--tp-radius-md);
  text-decoration: none;
  color: inherit;
  transition: background-color var(--tp-transition-fast);
  border-bottom: 1px solid var(--tp-border-subtle);
}

.tp-movers-mini-row:last-child {
  border-bottom: none;
}

.tp-movers-mini-row:hover {
  background-color: var(--tp-bg-surface-subtle);
}

/* Data Terminal & Controls */
.tp-movers-terminal-card {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-2xl);
  padding: 1.5rem;
  box-shadow: var(--tp-shadow-sm);
  margin-bottom: 2.5rem;
}

.tp-terminal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--tp-border-subtle);
}

.tp-category-pill-group {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tp-cat-btn {
  background: var(--tp-bg-surface-subtle);
  color: var(--tp-text-secondary);
  border: 1px solid var(--tp-border-color);
  padding: 0.45rem 0.95rem;
  border-radius: var(--tp-radius-full);
  font-family: var(--tp-font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--tp-transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 40px;
}

.tp-cat-btn:hover {
  background: var(--tp-bg-surface);
  color: var(--tp-text-primary);
  border-color: var(--tp-slate-300);
}

.tp-cat-btn.active {
  background: var(--tp-color-primary) !important;
  color: #fff !important;
  border-color: var(--tp-color-primary) !important;
}

/* Compact Crypto Section (Subtle, non-dominating) */
.tp-crypto-compact-strip {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-xl);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--tp-shadow-xs);
}

.tp-crypto-compact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.tp-crypto-compact-card {
  background: var(--tp-bg-surface-subtle);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-lg);
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: all var(--tp-transition-fast);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tp-crypto-compact-card:hover {
  border-color: #f59e0b;
  transform: translateY(-2px);
  background: var(--tp-bg-surface);
}

/* Responsive Rules for Markets */
@media (max-width: 1200px) {
  .tp-priority-grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }
  .tp-crypto-compact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .tp-sentiment-grid-2 {
    grid-template-columns: 1fr;
  }
  .tp-movers-showcase-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .tp-priority-grid-6 {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0.75rem !important;
    padding-bottom: 0.65rem !important;
    scrollbar-width: thin;
  }

  .tp-priority-card {
    flex: 0 0 170px !important;
    min-width: 170px !important;
    scroll-snap-align: start;
    padding: 0.95rem 1rem !important;
  }

  .tp-priority-val {
    font-size: 1.15rem !important;
  }

  .tp-chart-canvas-wrap {
    height: 240px;
  }

  .tp-crypto-compact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 350px) {
  .tp-priority-card {
    flex: 0 0 145px !important;
    min-width: 140px !important;
  }
}

/* ==========================================================================
   19. STOCKS & RESEARCH DESIGN SYSTEM STYLES (PHASE 7)
   ========================================================================== */

/* 7-Pillar Stocks Navigation Bar */
.tp-stocks-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.35rem;
  margin-bottom: 2rem;
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-xl);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tp-stocks-nav::-webkit-scrollbar {
  display: none;
}

.tp-stock-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--tp-radius-lg);
  font-family: var(--tp-font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--tp-text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--tp-transition-fast);
  border: 1px solid transparent;
  min-height: 44px;
  touch-action: manipulation;
}

.tp-stock-nav-btn:hover {
  color: var(--tp-text-primary);
  background-color: var(--tp-bg-surface-subtle);
}

.tp-stock-nav-btn.active {
  background-color: var(--tp-color-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.tp-stock-nav-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: var(--tp-radius-full);
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

/* Stock Detail Header Card (1. Name, Symbol, Price, Change) */
.tp-stock-detail-header {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-2xl);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--tp-shadow-sm);
}

.tp-stock-header-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.tp-stock-identity {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.tp-stock-logo-box {
  width: 58px;
  height: 58px;
  border-radius: var(--tp-radius-xl);
  background: var(--tp-bg-surface-subtle);
  border: 1.5px solid var(--tp-border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--tp-font-heading);
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--tp-text-primary);
  overflow: hidden;
  flex-shrink: 0;
}

.tp-stock-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tp-stock-price-block {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.tp-stock-price-val {
  font-family: var(--tp-font-mono);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 900;
  color: var(--tp-text-primary);
  line-height: 1.1;
}

/* Range bar & Stats Strip */
.tp-stock-range-strip {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--tp-border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.tp-stock-metrics-row {
  display: flex;
  gap: 1.75rem;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

/* Stock Structured Section Cards */
.tp-stock-section {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-2xl);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--tp-shadow-sm);
}

.tp-stock-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--tp-border-subtle);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tp-stock-section-title {
  font-family: var(--tp-font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--tp-text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tp-stock-section-subtitle {
  font-family: var(--tp-font-body);
  font-size: 0.8125rem;
  color: var(--tp-text-muted);
  margin: 0.25rem 0 0 0;
  line-height: 1.5;
}

/* 10-Box Fundamentals Grid */
.tp-fundamentals-grid-10 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.tp-fundamentals-item,
.tp-metric-card {
  background: var(--tp-bg-surface-subtle);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-lg);
  padding: 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 114px;
  position: relative;
  overflow: hidden;
  transition: all var(--tp-transition-fast);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tp-fundamentals-item::before,
.tp-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background var(--tp-transition-fast);
}

.tp-fundamentals-item:hover,
.tp-metric-card:hover {
  border-color: rgba(37, 99, 235, 0.45);
  background: var(--tp-bg-surface);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.25);
}

.tp-fundamentals-item:hover::before,
.tp-metric-card:hover::before {
  background: linear-gradient(90deg, var(--tp-color-primary), var(--tp-color-success));
}

.tp-fundamentals-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tp-fundamentals-label,
.tp-metric-label {
  font-family: var(--tp-font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--tp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tp-fundamentals-tag {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--tp-text-muted);
  flex-shrink: 0;
  line-height: 1;
}

.tp-fundamentals-tag.tp-tag-primary {
  background: rgba(37, 99, 235, 0.14);
  color: var(--tp-color-primary);
}

.tp-fundamentals-tag.tp-tag-success {
  background: rgba(16, 185, 129, 0.14);
  color: var(--tp-color-success);
}

.tp-fundamentals-tag.tp-tag-warning {
  background: rgba(245, 158, 11, 0.14);
  color: var(--tp-color-warning);
}

.tp-fundamentals-value,
.tp-metric-val {
  font-family: var(--tp-font-mono);
  font-size: 1.38rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--tp-text-primary);
  line-height: 1.25;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: baseline;
}

.tp-fundamentals-value.is-positive {
  color: var(--tp-color-success);
}

.tp-fundamentals-value.is-primary {
  color: var(--tp-color-primary);
}

.tp-fundamentals-value.is-warning {
  color: var(--tp-color-warning);
}

.tp-fundamentals-sub,
.tp-metric-sub {
  font-family: var(--tp-font-body);
  font-size: 0.725rem;
  font-weight: 500;
  color: var(--tp-text-secondary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tp-fundamentals-sub .tp-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--tp-color-primary);
  display: inline-block;
  flex-shrink: 0;
}

/* ==========================================================================
   CONFLUENCE RADAR & TRADE SETUP COMPONENT (Light & Dark Theme Adaptive)
   ========================================================================== */
.tp-confluence-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-2xl);
  padding: 2rem;
  margin-bottom: 2.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
  transition: all var(--tp-transition-fast);
}

.tp-confluence-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4f46e5, #0284c7, #10b981);
}

.tp-confluence-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.tp-confluence-tag-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.tp-confluence-brand-tag {
  font-family: var(--tp-font-heading);
  font-size: 0.775rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4f46e5;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.tp-confluence-sub-pill {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #4338ca;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tp-confluence-title {
  font-family: var(--tp-font-heading);
  font-size: 1.6rem;
  font-weight: 900;
  margin: 0;
  color: var(--tp-text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tp-confluence-verdict-badge {
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
}

.tp-confluence-desc {
  color: var(--tp-text-secondary);
  font-size: 0.925rem;
  margin: 0.5rem 0 0 0;
  max-width: 780px;
  line-height: 1.6;
}

/* Confluence Score Box */
.tp-confluence-score-box {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  background: var(--tp-bg-surface-subtle, #f8fafc);
  border: 1px solid var(--tp-border-color);
  border-radius: 16px;
  padding: 1rem 1.35rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tp-confluence-score-label {
  font-size: 0.7rem;
  color: var(--tp-text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tp-confluence-score-text {
  font-size: 0.825rem;
  font-weight: 800;
  margin-top: 0.15rem;
}

.tp-confluence-dial {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  font-weight: 900;
  font-family: var(--tp-font-mono);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

/* 2-Column Grid: 5 Pillars vs Setup */
.tp-confluence-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: center;
}

.tp-confluence-pillars {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.tp-confluence-pillar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.825rem;
  margin-bottom: 0.35rem;
}

.tp-confluence-pillar-name {
  font-weight: 700;
  color: var(--tp-text-primary);
}

.tp-confluence-pillar-score {
  font-weight: 800;
  font-family: var(--tp-font-mono);
}

.tp-confluence-pillar-track {
  height: 6px;
  background: var(--tp-border-color, #e2e8f0);
  border-radius: 3px;
  overflow: hidden;
}

.tp-confluence-pillar-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* Trade Setup Card */
.tp-confluence-setup-box {
  background: var(--tp-bg-surface-subtle, #f8fafc);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-xl);
  padding: 1.35rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tp-confluence-setup-header {
  font-size: 0.8rem;
  font-weight: 800;
  color: #4f46e5;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tp-confluence-setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.tp-confluence-mini-card {
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid transparent;
  transition: transform var(--tp-transition-fast), box-shadow var(--tp-transition-fast);
}

.tp-confluence-mini-card.entry {
  background: #ffffff;
  border-color: var(--tp-border-color, #e2e8f0);
}
.tp-confluence-mini-card.entry .tp-confluence-mini-label { color: #64748b; }
.tp-confluence-mini-card.entry .tp-confluence-mini-val { color: #0f172a; }

.tp-confluence-mini-card.sl {
  background: #fff1f2;
  border-color: #fecdd3;
}
.tp-confluence-mini-card.sl .tp-confluence-mini-label { color: #9f1239; }
.tp-confluence-mini-card.sl .tp-confluence-mini-val { color: #e11d48; }
.tp-confluence-mini-card.sl .tp-confluence-mini-sub { color: #be123c; }

.tp-confluence-mini-card.tgt {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.tp-confluence-mini-card.tgt .tp-confluence-mini-label { color: #166534; }
.tp-confluence-mini-card.tgt .tp-confluence-mini-val { color: #16a34a; }

.tp-confluence-mini-card.rr {
  background: #f5f3ff;
  border-color: #ddd6fe;
}
.tp-confluence-mini-card.rr .tp-confluence-mini-label { color: #4338ca; }
.tp-confluence-mini-card.rr .tp-confluence-mini-val { color: #6366f1; }
.tp-confluence-mini-card.rr .tp-confluence-mini-sub { color: #4f46e5; }

.tp-confluence-mini-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.tp-confluence-mini-val {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: var(--tp-font-mono);
  line-height: 1.2;
}

.tp-confluence-mini-sub {
  font-size: 0.68rem;
  font-weight: 700;
  margin-top: 0.2rem;
}

.tp-confluence-pillar-score.is-high { color: #059669; }
.tp-confluence-pillar-score.is-med  { color: #d97706; }
.tp-confluence-pillar-score.is-low  { color: #dc2626; }

.tp-confluence-pillar-bar.is-high { background: linear-gradient(90deg, #10b981, #059669); }
.tp-confluence-pillar-bar.is-med  { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.tp-confluence-pillar-bar.is-low  { background: linear-gradient(90deg, #f87171, #ef4444); }

.tp-confluence-btn-secondary {
  background: #ffffff !important;
  border: 1px solid var(--tp-border-color, #cbd5e1) !important;
  color: var(--tp-text-primary, #0f172a) !important;
  font-weight: 700 !important;
}
.tp-confluence-btn-secondary:hover {
  background: var(--tp-bg-surface-subtle, #f1f5f9) !important;
  border-color: var(--tp-color-primary) !important;
}

/* Dark Mode Theme Adaptation */
[data-theme="dark"] .tp-confluence-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 27, 75, 0.85));
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .tp-confluence-brand-tag {
  color: #a5b4fc;
}

[data-theme="dark"] .tp-confluence-sub-pill {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
}

[data-theme="dark"] .tp-confluence-title {
  color: #ffffff;
}

[data-theme="dark"] .tp-confluence-desc {
  color: #cbd5e1;
}

[data-theme="dark"] .tp-confluence-score-box {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .tp-confluence-score-label {
  color: #94a3b8;
}

[data-theme="dark"] .tp-confluence-dial {
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
}

[data-theme="dark"] .tp-confluence-pillar-name {
  color: #e2e8f0;
}

[data-theme="dark"] .tp-confluence-pillar-track {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .tp-confluence-pillar-score.is-high { color: #34d399; }
[data-theme="dark"] .tp-confluence-pillar-score.is-med  { color: #fbbf24; }
[data-theme="dark"] .tp-confluence-pillar-score.is-low  { color: #f87171; }

[data-theme="dark"] .tp-confluence-setup-box {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .tp-confluence-setup-header {
  color: #a5b4fc;
}

[data-theme="dark"] .tp-confluence-mini-card.entry {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .tp-confluence-mini-card.entry .tp-confluence-mini-label {
  color: #94a3b8;
}
[data-theme="dark"] .tp-confluence-mini-card.entry .tp-confluence-mini-val {
  color: #ffffff;
}

[data-theme="dark"] .tp-confluence-mini-card.sl {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
}
[data-theme="dark"] .tp-confluence-mini-card.sl .tp-confluence-mini-label {
  color: #fca5a5;
}
[data-theme="dark"] .tp-confluence-mini-card.sl .tp-confluence-mini-val {
  color: #f87171;
}
[data-theme="dark"] .tp-confluence-mini-card.sl .tp-confluence-mini-sub {
  color: #ef4444;
}

[data-theme="dark"] .tp-confluence-mini-card.tgt {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
}
[data-theme="dark"] .tp-confluence-mini-card.tgt .tp-confluence-mini-label {
  color: #86efac;
}
[data-theme="dark"] .tp-confluence-mini-card.tgt .tp-confluence-mini-val {
  color: #34d399;
}

[data-theme="dark"] .tp-confluence-mini-card.rr {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.25);
}
[data-theme="dark"] .tp-confluence-mini-card.rr .tp-confluence-mini-label {
  color: #c7d2fe;
}
[data-theme="dark"] .tp-confluence-mini-card.rr .tp-confluence-mini-val {
  color: #818cf8;
}
[data-theme="dark"] .tp-confluence-mini-card.rr .tp-confluence-mini-sub {
  color: #a5b4fc;
}

[data-theme="dark"] .tp-confluence-btn-secondary {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

@media (max-width: 900px) {
  .tp-confluence-grid {
    grid-template-columns: 1fr;
  }
}

/* Find Stocks Discovery Grid */
.tp-find-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.tp-find-card {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: all var(--tp-transition-fast);
  box-shadow: var(--tp-shadow-xs);
}

.tp-find-card:hover {
  border-color: var(--tp-color-primary);
  transform: translateY(-2px);
  box-shadow: var(--tp-shadow-md);
}

/* Screener Quant Recipes Grid */
.tp-screener-recipes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.tp-recipe-card {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-lg);
  padding: 1.15rem;
  cursor: pointer;
  transition: all var(--tp-transition-fast);
}

.tp-recipe-card:hover,
.tp-recipe-card.active {
  border-color: var(--tp-color-primary);
  background: var(--tp-bg-surface-subtle);
  transform: translateY(-2px);
}

/* Responsive Rules for Stocks */
@media (max-width: 1200px) {
  .tp-fundamentals-grid-10 {
    grid-template-columns: repeat(3, 1fr);
  }
  .tp-screener-recipes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .tp-fundamentals-grid-10 {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .tp-screener-recipes-grid {
    grid-template-columns: 1fr;
  }
  .tp-stock-metrics-row {
    gap: 1rem;
    font-size: 0.78rem;
  }
  .tp-stock-identity {
    gap: 0.85rem;
  }
  .tp-stock-logo-box {
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .tp-fundamentals-grid-10 {
    grid-template-columns: 1fr;
  }
  .tp-stock-price-block {
    align-items: flex-start;
    margin-top: 0.5rem;
  }
}

/* ==========================================================================
   PHASE 8: TRADING & PAPER TRADING DESIGN SYSTEM SUITE
   ========================================================================== */

/* 6-Pillar Institutional Trading Navigation Bar */
.tp-trading-nav-wrap {
  margin-bottom: 2rem;
  position: relative;
}

.tp-trading-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.3rem 0.4rem;
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-xl);
  scrollbar-width: thin;
  scrollbar-color: var(--tp-border-color) transparent;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tp-trading-nav::-webkit-scrollbar {
  height: 3px;
}

.tp-trading-nav::-webkit-scrollbar-thumb {
  background: var(--tp-border-color);
  border-radius: 4px;
}

.tp-trading-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.85rem;
  border-radius: var(--tp-radius-lg);
  font-family: var(--tp-font-heading);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--tp-text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--tp-transition-fast);
  border: 1px solid transparent;
  min-height: 38px;
  touch-action: manipulation;
}

.tp-trading-nav-btn:hover {
  color: var(--tp-text-primary);
  background-color: var(--tp-bg-surface-subtle);
  border-color: var(--tp-border-subtle);
}

.tp-trading-nav-btn.active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  border-color: transparent;
}

.tp-trading-nav-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: var(--tp-radius-full);
  letter-spacing: 0.04em;
  transition: all var(--tp-transition-fast);
}

.tp-trading-nav-btn.active .tp-trading-nav-badge {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

/* Trading Hero & Header */
.tp-trade-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.tp-trade-title {
  font-family: var(--tp-font-heading);
  font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  font-weight: 800;
  color: var(--tp-text-primary);
  margin: 0 0 0.4rem 0;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.tp-trade-subtitle {
  color: var(--tp-text-secondary);
  font-size: 0.95rem;
  margin: 0;
  max-width: 680px;
  line-height: 1.5;
}

/* Trading Telemetry Grid */
.tp-trade-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.tp-trade-stat-card {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-xl);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--tp-shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform var(--tp-transition-fast), box-shadow var(--tp-transition-fast);
}

.tp-trade-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--tp-shadow-md);
}

.tp-trade-stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--tp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tp-trade-stat-val {
  font-family: var(--tp-font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--tp-text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.tp-trade-stat-sub {
  font-size: 0.78rem;
  color: var(--tp-text-secondary);
  margin-top: 0.35rem;
  font-weight: 600;
}

/* Account Sandbox Switcher Bar */
.tp-sandbox-switcher {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-lg);
  margin-bottom: 1.75rem;
}

/* Terminal Two-Column Grid */
.tp-terminal-layout {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 1.75rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

.tp-terminal-ticket-card {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-xl);
  padding: 1.5rem;
  box-shadow: var(--tp-shadow-sm);
  position: sticky;
  top: 90px;
}

.tp-terminal-main-card {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-xl);
  padding: 1.5rem;
  box-shadow: var(--tp-shadow-sm);
  margin-bottom: 1.75rem;
}

/* Side Toggle (Buy / Sell) */
.tp-side-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tp-side-radio-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 0.5rem;
  border-radius: var(--tp-radius-md);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  min-height: 44px;
  touch-action: manipulation;
  transition: all var(--tp-transition-fast);
}

.tp-side-radio-label.is-buy {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--tp-color-success);
}

.tp-side-radio-label.is-buy:hover,
.tp-side-radio-label.is-buy.selected {
  background: var(--tp-color-success);
  color: #ffffff;
}

.tp-side-radio-label.is-sell {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--tp-color-danger);
}

.tp-side-radio-label.is-sell:hover,
.tp-side-radio-label.is-sell.selected {
  background: var(--tp-color-danger);
  color: #ffffff;
}

/* Quick Qty Chips */
.tp-qty-chips {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.45rem;
}

.tp-qty-chip {
  background: var(--tp-bg-surface-subtle);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-md);
  padding: 0.2rem 0.55rem;
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--tp-text-secondary);
  cursor: pointer;
  min-height: 32px;
  touch-action: manipulation;
  transition: all var(--tp-transition-fast);
}

.tp-qty-chip:hover {
  color: var(--tp-color-primary);
  border-color: var(--tp-color-primary-border);
  background: var(--tp-color-primary-subtle);
}

/* PnL Badges */
.tp-pnl-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--tp-font-body);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 0.875rem;
}

.tp-pnl-pill.is-pos {
  color: var(--tp-color-success);
}

.tp-pnl-pill.is-neg {
  color: var(--tp-color-danger);
}

/* Responsive Rules for Mobile */
@media (max-width: 1024px) {
  .tp-terminal-layout {
    grid-template-columns: 1fr;
  }
  .tp-terminal-ticket-card {
    position: static;
  }
}

@media (max-width: 768px) {
  .tp-trade-stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .tp-trade-stat-card {
    padding: 1rem;
  }
  .tp-trade-stat-val {
    font-size: 1.35rem;
  }
  .tp-sandbox-switcher {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .tp-trade-stat-grid {
    grid-template-columns: 1fr;
  }
}
/* ==========================================================================
   PHASE 9: PORTFOLIO & ASSET ALLOCATION DESIGN SYSTEM SUITE
   ========================================================================== */

/* 5-Pillar Portfolio Navigation Bar */
.tp-portfolio-nav-wrap {
  margin-bottom: 2rem;
}

.tp-portfolio-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.35rem;
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-xl);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tp-portfolio-nav::-webkit-scrollbar {
  display: none;
}

.tp-portfolio-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: var(--tp-radius-lg);
  font-family: var(--tp-font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--tp-text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--tp-transition-fast);
  border: 1px solid transparent;
  min-height: 44px;
  touch-action: manipulation;
}

.tp-portfolio-nav-btn:hover {
  color: var(--tp-text-primary);
  background-color: var(--tp-bg-surface-subtle);
}

.tp-portfolio-nav-btn.active {
  background-color: var(--tp-color-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.tp-portfolio-nav-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: var(--tp-radius-full);
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}

/* Portfolio Hero & Telemetry */
.tp-portfolio-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.tp-portfolio-title {
  font-family: var(--tp-font-heading);
  font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  font-weight: 800;
  color: var(--tp-text-primary);
  margin: 0 0 0.4rem 0;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.tp-portfolio-subtitle {
  color: var(--tp-text-secondary);
  font-size: 0.95rem;
  margin: 0;
  max-width: 680px;
  line-height: 1.5;
}

/* 5-Metric Telemetry Cards Grid */
.tp-portfolio-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.tp-portfolio-stat-card {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-xl);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--tp-shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform var(--tp-transition-fast), box-shadow var(--tp-transition-fast);
}

.tp-portfolio-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--tp-shadow-md);
}

.tp-portfolio-stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--tp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tp-portfolio-stat-val {
  font-family: var(--tp-font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--tp-text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.tp-portfolio-stat-sub {
  font-size: 0.78rem;
  color: var(--tp-text-secondary);
  margin-top: 0.35rem;
  font-weight: 600;
}

/* Portfolio 2-Column Hub Layout */
.tp-portfolio-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 3rem;
}

/* Allocation Box */
.tp-allocation-box {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: var(--tp-radius-xl);
  padding: 1.5rem;
  box-shadow: var(--tp-shadow-sm);
}

/* Responsive Rules for Portfolio */
@media (max-width: 1024px) {
  .tp-portfolio-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .tp-portfolio-stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .tp-portfolio-stat-card {
    padding: 1rem;
  }
  .tp-portfolio-stat-val {
    font-size: 1.35rem;
  }
}

@media (max-width: 480px) {
  .tp-portfolio-stat-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   ACCESSIBILITY: PREFERS-REDUCED-MOTION
   Ensures users requesting reduced motion experience instant, comfortable transitions
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .pulse-dot,
  .tp-skeleton,
  .shimmer {
    animation: none !important;
    opacity: 0.8 !important;
  }

  .tp-btn:hover,
  .tp-card-interactive:hover,
  .card-interactive:hover {
    transform: none !important;
  }
}

/* ==========================================================================
   ACCESSIBILITY: KEYBOARD NAVIGATION & SKIP LINK
   ========================================================================== */
.tp-skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--tp-color-primary);
  color: #ffffff !important;
  padding: 0.5rem 1rem;
  border-radius: var(--tp-radius-md);
  font-weight: 700;
  font-size: 0.875rem;
  z-index: 99999;
  transition: top 0.2s ease;
  text-decoration: none;
}
.tp-skip-link:focus,
.tp-skip-link:focus-visible {
  top: 1rem;
  outline: 3px solid #ffffff;
}

:focus-visible {
  outline: 2px solid var(--tp-color-primary) !important;
  outline-offset: 2px !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--tp-color-primary) !important;
  outline-offset: 2px !important;
}

/* ==========================================================================
   HOMEPAGE V2: DESKTOP & MOBILE REFERENCE FIDELITY SYSTEM
   ========================================================================== */

/* Focused Content Container (1180px–1240px Sweet Spot) */
.tp-hero-v2 .container,
.tp-home-section .container,
.site-footer .container {
  width: 100%;
  max-width: 1220px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 2.5vw, 1.75rem);
  padding-right: clamp(1rem, 2.5vw, 1.75rem);
}

/* 1. Hero Split Grid */
.tp-hero-v2 {
  padding: 2.75rem 0 3.25rem;
}

.tp-home-section {
  padding: 3rem 0;
}

.tp-hero-split-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 2.75rem;
  align-items: center;
}

.tp-hero-left {
  text-align: left;
}

.tp-hero-badge-v2 {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.25);
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  font-family: var(--tp-font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

[data-theme="dark"] .tp-hero-badge-v2 {
  background: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

.tp-hero-h1-v2 {
  font-family: var(--tp-font-heading);
  font-size: clamp(2.5rem, 3.8vw, 3.4rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--tp-text-primary);
  margin-bottom: 1.25rem;
}

.tp-hero-h1-v2 .tp-blue-accent {
  color: #2563eb;
}

[data-theme="dark"] .tp-hero-h1-v2 .tp-blue-accent {
  color: #3b82f6;
}

.tp-hero-desc-v2 {
  font-family: var(--tp-font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--tp-text-secondary);
  margin-bottom: 1.5rem;
  max-width: 530px;
}

.tp-hero-ctas-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tp-hero-search-box-v2 {
  position: relative;
  max-width: 540px;
  margin-bottom: 1rem;
}

.tp-hero-search-bar-v2 {
  display: flex;
  align-items: center;
  background: var(--tp-bg-surface);
  border: 1.5px solid var(--tp-border-color);
  border-radius: 999px;
  padding: 0.35rem 0.45rem 0.35rem 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tp-hero-search-bar-v2:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 8px 24px rgba(0, 0, 0, 0.08);
}

.tp-hero-search-input-v2 {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--tp-font-body);
  font-size: 0.95rem;
  color: var(--tp-text-primary);
  padding: 0.5rem 0.75rem;
}

.tp-hero-search-input-v2::placeholder {
  color: var(--tp-text-muted);
}

.tp-hero-search-btn-v2 {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.75rem;
  font-family: var(--tp-font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.tp-hero-search-btn-v2:hover {
  background: #1d4ed8;
  transform: scale(1.02);
}

.tp-hero-suggestions-v2 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--tp-text-muted);
}

.tp-hero-suggestions-label {
  font-family: var(--tp-font-heading);
  font-weight: 700;
  color: var(--tp-text-muted);
  margin-right: 0.25rem;
}

.tp-hero-chip {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: 999px;
  padding: 0.25rem 0.85rem;
  font-family: var(--tp-font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tp-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.tp-hero-chip:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.05);
}

/* Hero Right: Mockup & Cursive Annotation */
.tp-hero-right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tp-hero-mockup-card {
  position: relative;
  width: 100%;
  max-width: 580px;
}

.tp-hero-mockup-img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  display: block;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .tp-hero-mockup-img {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.tp-hero-cursive-badge {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  animation: tpHeroBadgeFloat 4s ease-in-out infinite;
}

@keyframes tpHeroBadgeFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-4px) rotate(-1.2deg); }
}

.tp-hcb-text {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 16px;
  padding: 0.55rem 0.95rem 0.6rem;
  box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  line-height: 1.15;
}

[data-theme="dark"] .tp-hcb-text {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(96, 165, 250, 0.35);
  box-shadow: 0 18px 36px -8px rgba(0, 0, 0, 0.6), 0 0 20px rgba(37, 99, 235, 0.25);
}

.tp-hcb-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #2563eb;
  margin-bottom: 2px;
}

[data-theme="dark"] .tp-hcb-tag {
  color: #60a5fa;
}

.tp-hcb-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  display: inline-block;
}

.tp-hcb-line1 {
  font-family: 'Caveat', cursive;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.2px;
  line-height: 1.12;
}

[data-theme="dark"] .tp-hcb-line1 {
  color: #f8fafc;
}

.tp-hcb-line2 {
  font-family: 'Caveat', cursive;
  font-size: 1.42rem;
  font-weight: 700;
  color: #2563eb;
  letter-spacing: 0.2px;
  line-height: 1.12;
}

[data-theme="dark"] .tp-hcb-line2 {
  color: #38bdf8;
  text-shadow: 0 0 14px rgba(56, 189, 248, 0.5);
}

.tp-hcb-arrow {
  color: #2563eb;
  margin-right: 18px;
  margin-top: 2px;
  transform: rotate(-4deg);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

[data-theme="dark"] .tp-hcb-arrow {
  color: #38bdf8;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.6));
}

/* Mobile Hero Specifics */
.tp-hero-mobile-graphic {
  display: none !important;
}

.tp-hero-mobile-ctas {
  display: none !important;
}

/* 2. Market Snapshot Grid (6 Items) */
.tp-snapshot-grid-v2 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.85rem;
}

.tp-snapshot-card-v2 {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: 12px;
  padding: 0.85rem 0.95rem 0.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  min-height: 115px;
}

.tp-snapshot-card-v2:hover {
  transform: translateY(-2px);
  border-color: #38bdf8;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.tp-snapshot-card-v2 .tp-name {
  font-family: var(--tp-font-heading);
  font-size: 0.725rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--tp-text-muted);
  letter-spacing: 0.4px;
}

.tp-snapshot-card-v2 .tp-val {
  font-family: 'Plus Jakarta Sans', monospace;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--tp-text-primary);
  margin-top: 0.2rem;
  line-height: 1.2;
}

.tp-snapshot-card-v2 .tp-change {
  font-family: 'Plus Jakarta Sans', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.tp-snapshot-card-v2 .tp-sparkline-wrap {
  margin-top: 0.45rem;
  width: 100%;
}

.tp-live-pill-v2 {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1;
}

.tp-live-pill-v2 .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

/* 3. What do you want to do today? (4 Cards) */
.tp-action-grid-v2 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.tp-action-card-v2 {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.tp-action-card-v2:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
  border-color: var(--tp-color-primary);
}

.tp-action-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1.15rem;
}

.tp-action-title-v2 {
  font-family: var(--tp-font-heading);
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--tp-text-primary);
  margin: 0 0 0.4rem;
}

.tp-action-desc-v2 {
  font-family: var(--tp-font-body);
  font-size: 0.85rem;
  color: var(--tp-text-secondary);
  line-height: 1.45;
  margin: 0;
}

.tp-action-circle-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  margin-top: 1.25rem;
  align-self: flex-end;
  transition: transform 0.15s ease, background 0.15s ease;
}

.tp-action-card-v2:hover .tp-action-circle-btn {
  transform: translateX(3px);
}

/* 4. Split 2-Column Section (Popular Stocks & Latest Market News) */
.tp-split-stocks-news-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 2rem;
  align-items: start;
}

.tp-split-stocks-news-grid > * {
  min-width: 0;
}

.tp-stocks-table-card {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.tp-stocks-table {
  width: 100%;
  border-collapse: collapse;
}

.tp-stocks-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-family: var(--tp-font-heading);
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--tp-text-muted);
  border-bottom: 1px solid var(--tp-border-color);
  letter-spacing: 0.4px;
}

.tp-stocks-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--tp-border-subtle);
  vertical-align: middle;
  height: 56px;
}

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

.tp-stocks-table tr:hover {
  background: var(--tp-bg-surface-subtle);
}

.tp-stock-cell-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tp-stock-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.tp-stock-name-title {
  font-family: var(--tp-font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--tp-text-primary);
}

/* News List with Thumbnails */
.tp-news-list-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.tp-news-item-horizontal {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: 14px;
  padding: 0.85rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.tp-news-item-horizontal:hover {
  transform: translateY(-2px);
  border-color: #38bdf8;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.tp-news-thumb-img {
  width: 84px;
  height: 68px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.tp-news-content {
  flex: 1;
  min-width: 0;
}

.tp-news-source-badge {
  font-family: var(--tp-font-heading);
  font-size: 0.685rem;
  font-weight: 800;
  color: var(--tp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.tp-news-headline {
  font-family: var(--tp-font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--tp-text-primary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 5. Useful Tools (4 Cards) */
.tp-tools-grid-v2 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.tp-tool-card-v2 {
  background: var(--tp-bg-surface);
  border: 1px solid var(--tp-border-color);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.tp-tool-card-v2:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
  border-color: var(--tp-color-primary);
}

.tp-tool-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1.15rem;
}

.tp-tool-title-v2 {
  font-family: var(--tp-font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--tp-text-primary);
  margin: 0 0 0.35rem;
}

.tp-tool-desc-v2 {
  font-family: var(--tp-font-body);
  font-size: 0.85rem;
  color: var(--tp-text-secondary);
  line-height: 1.45;
  margin: 0;
}

.tp-tool-arrow-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  margin-top: 1.25rem;
  align-self: flex-end;
  transition: transform 0.15s ease;
}

.tp-tool-card-v2:hover .tp-tool-arrow-btn {
  transform: translateX(3px);
}

/* 6. Ask TickerPulse AI Full-Width Banner */
.tp-ai-banner-v2 {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 2.25rem 2.5rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
}

.tp-ai-banner-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 480px;
}

.tp-ai-robot-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.4);
}

.tp-ai-banner-title {
  font-family: var(--tp-font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff !important;
  margin: 0 0 0.35rem;
}

[data-theme="light"] .tp-ai-banner-title,
[data-theme="light"] .tp-ai-banner-v2 h2 {
  color: #ffffff !important;
}

.tp-ai-banner-desc {
  font-family: var(--tp-font-body);
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
}

.tp-ai-banner-right {
  flex: 1;
  max-width: 520px;
}

.tp-ai-input-wrap-v2 {
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 999px;
  padding: 0.3rem 0.4rem 0.3rem 1.15rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin-bottom: 0.75rem;
}

.tp-ai-input-v2 {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--tp-font-body);
  font-size: 0.9rem;
  color: #0f172a;
  padding: 0.45rem 0.5rem;
}

.tp-ai-input-v2::placeholder {
  color: #94a3b8;
}

.tp-ai-send-btn-v2 {
  background: #4f46e5;
  color: #ffffff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.tp-ai-send-btn-v2:hover {
  background: #4338ca;
  transform: scale(1.05);
}

.tp-ai-pills-wrap-v2 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.tp-ai-pill-v2 {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-family: var(--tp-font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tp-ai-pill-v2:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: #6366f1;
}

/* ==========================================================================
   6B. Trading Journal Promotional Banner (Home Page Feature Showcase)
   ========================================================================== */
.tp-journal-promo-section {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.tp-journal-banner {
  position: relative;
  background: linear-gradient(135deg, #070d19 0%, #0c182c 45%, #081120 100%);
  border: 1px solid rgba(59, 130, 246, 0.24);
  border-radius: 20px;
  padding: 2.25rem 2.5rem;
  overflow: hidden;
  box-shadow: 0 16px 40px -12px rgba(2, 6, 23, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.tp-jb-glow-top {
  position: absolute;
  top: -60px;
  right: -40px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22) 0%, rgba(37, 99, 235, 0) 70%);
  filter: blur(40px);
  pointer-events: none;
}

.tp-jb-glow-bottom {
  position: absolute;
  bottom: -80px;
  left: 20%;
  width: 400px;
  height: 250px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0) 70%);
  filter: blur(50px);
  pointer-events: none;
}

.tp-jb-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 2.5rem;
}

.tp-jb-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.75rem;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 999px;
  font-family: var(--tp-font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #60a5fa !important;
  margin-bottom: 0.85rem;
  text-transform: uppercase;
}

.tp-jb-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 8px #3b82f6;
}

.tp-jb-title {
  font-family: var(--tp-font-heading);
  font-size: clamp(1.5rem, 2.4vw, 2.15rem);
  font-weight: 800;
  color: #ffffff !important;
  line-height: 1.22;
  margin: 0 0 0.65rem;
  letter-spacing: -0.3px;
}

[data-theme="light"] .tp-jb-title,
[data-theme="light"] .tp-journal-banner h2 {
  color: #ffffff !important;
}

.tp-jb-title-accent {
  background: linear-gradient(90deg, #60a5fa 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tp-jb-desc {
  font-family: var(--tp-font-body);
  font-size: 0.925rem;
  color: #cbd5e1 !important;
  line-height: 1.55;
  margin: 0 0 1.4rem;
  max-width: 520px;
}

[data-theme="light"] .tp-jb-desc,
[data-theme="light"] .tp-journal-banner p {
  color: #cbd5e1 !important;
}

.tp-jb-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.tp-jb-stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: transform var(--tp-transition-fast), border-color var(--tp-transition-fast), background var(--tp-transition-fast);
}

.tp-jb-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(255, 255, 255, 0.07);
}

.tp-jb-stat-val {
  font-family: var(--tp-font-mono);
  font-weight: 800;
  font-size: 1.02rem;
  color: #ffffff !important;
  line-height: 1.2;
  white-space: nowrap;
}

.tp-jb-stat-val.tp-val-green {
  color: #34d399 !important;
}

.tp-jb-stat-val.tp-val-blue {
  color: #60a5fa !important;
}

.tp-jb-stat-val.tp-val-amber {
  color: #fcd34d !important;
  font-family: var(--tp-font-heading);
  font-size: 0.92rem;
}

.tp-jb-stat-label {
  font-size: 0.64rem;
  color: #94a3b8 !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 0.25rem;
  white-space: nowrap;
}

.tp-jb-cta-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tp-jb-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff !important;
  font-family: var(--tp-font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.68rem 1.45rem;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  transition: all var(--tp-transition-fast);
}

.tp-jb-cta-btn:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5);
  color: #ffffff !important;
}

.tp-jb-cta-btn svg {
  transition: transform var(--tp-transition-fast);
}

.tp-jb-cta-btn:hover svg {
  transform: translateX(3px);
}

.tp-jb-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

.tp-jb-mockup-wrap {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.tp-jb-mockup-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 14px;
  padding: 1.15rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
}

.tp-jb-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.tp-jb-trade-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tp-jb-ticker {
  font-family: var(--tp-font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  color: #ffffff !important;
}

.tp-jb-trade-tag {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399 !important;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.tp-jb-trade-pnl {
  font-family: var(--tp-font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  color: #34d399 !important;
}

.tp-jb-trade-pct {
  font-size: 0.72rem;
  opacity: 0.9;
}

.tp-jb-chart-wrap {
  position: relative;
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 0.5rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.tp-jb-chart-svg {
  width: 100%;
  height: 90px;
  display: block;
}

.tp-jb-pin {
  position: absolute;
  font-family: var(--tp-font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  line-height: 1;
  pointer-events: none;
}

.tp-jb-pin-entry {
  bottom: 24px;
  left: 32%;
  background: rgba(37, 99, 235, 0.9);
  color: #ffffff !important;
}

.tp-jb-pin-target {
  top: 10px;
  right: 14px;
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff !important;
}

.tp-jb-card-footer {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
}

.tp-jb-pill {
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8 !important;
  font-weight: 600;
}

.tp-jb-checklist-card {
  position: absolute;
  bottom: -18px;
  right: -12px;
  background: rgba(8, 17, 34, 0.95);
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 12px;
  padding: 0.75rem 0.95rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  z-index: 2;
}

.tp-jb-checklist-title {
  font-family: var(--tp-font-heading);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #93c5fd !important;
  margin-bottom: 0.45rem;
}

.tp-jb-checklist-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.tp-jb-check-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: #e2e8f0 !important;
  white-space: nowrap;
}

.tp-jb-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399 !important;
  font-size: 0.65rem;
  font-weight: 900;
  line-height: 1;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .tp-jb-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .tp-jb-right {
    justify-content: flex-start;
  }
  
  .tp-jb-mockup-wrap {
    max-width: 440px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .tp-journal-banner {
    padding: 1.5rem 1.15rem;
    border-radius: 16px;
  }
  
  .tp-jb-stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
  }
  
  .tp-jb-stat-card {
    flex: 1 1 calc(33.333% - 0.45rem);
    min-width: 80px;
    padding: 0.5rem 0.4rem;
  }
  
  .tp-jb-stat-card:nth-child(4),
  .tp-jb-stat-card:nth-child(5) {
    flex: 1 1 calc(50% - 0.45rem);
  }
  
  .tp-jb-mockup-wrap {
    max-width: 100%;
  }
  
  .tp-jb-checklist-card {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 0.85rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .tp-jb-checklist-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem 0.65rem;
  }
}

@media (max-width: 480px) {
  .tp-jb-title {
    font-size: 1.45rem;
  }
  
  .tp-jb-desc {
    font-size: 0.85rem;
  }
  
  .tp-jb-checklist-items {
    grid-template-columns: 1fr;
  }
}



/* 8. Responsive Adjustments for Tablet & Mobile */
@media (max-width: 1024px) {
  .tp-hero-split-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .tp-hero-left {
    text-align: center;
  }
  
  .tp-hero-desc-v2,
  .tp-hero-search-box-v2 {
    margin-left: auto;
    margin-right: auto;
  }
  
  .tp-hero-suggestions-v2 {
    justify-content: center;
  }
  
  .tp-snapshot-grid-v2 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .tp-action-grid-v2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .tp-tools-grid-v2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .tp-split-stocks-news-grid {
    grid-template-columns: 1fr;
  }
  
  .tp-ai-banner-v2 {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
  }
  
  .tp-ai-banner-left {
    flex-direction: column;
    max-width: 100%;
  }
  
  .tp-ai-banner-right {
    max-width: 100%;
    width: 100%;
  }
  
  .tp-ai-pills-wrap-v2 {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 65px;
  }
  
  .tp-hero-right {
    display: none !important;
  }
  
  .tp-hero-mobile-graphic {
    display: block !important;
    position: relative;
    max-width: 340px;
    margin: 1.75rem auto 0;
  }
  
  .tp-hero-mobile-img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
  }
  
  .tp-hero-mobile-cursive {
    position: absolute;
    left: 12px;
    top: 12px;
    right: auto;
    z-index: 4;
    pointer-events: none;
    transform: rotate(1.5deg);
  }
  
  .tp-hero-mobile-cursive .tp-hcb-text {
    padding: 0.35rem 0.65rem;
    border-radius: 12px;
    align-items: flex-start;
    text-align: left;
  }

  .tp-hero-mobile-cursive .tp-hcb-tag {
    font-size: 0.58rem;
    margin-bottom: 1px;
  }
  
  .tp-hero-mobile-cursive .tp-hcb-line1 {
    font-size: 1.05rem;
  }
  
  .tp-hero-mobile-cursive .tp-hcb-line2 {
    font-size: 1.15rem;
  }
  
  .tp-hero-mobile-ctas {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
  }
  
  .tp-snapshot-grid-v2 {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  
  .tp-snapshot-grid-v2::-webkit-scrollbar {
    display: none;
  }
  
  .tp-snapshot-card-v2 {
    flex: 0 0 165px;
    scroll-snap-align: start;
  }
  
  .tp-action-grid-v2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .tp-action-card-v2 {
    padding: 1.15rem;
  }
  
  .tp-tools-grid-v2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .tp-tool-card-v2 {
    padding: 1.15rem;
  }
}

/* ==========================================================================
   STOCKS DIRECTORY & SCREENER COMPONENTS (Category Pills, Form Controls & Action Buttons)
   ========================================================================== */

/* Directory Category Filter Pills */
.stocks-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  font-family: var(--tp-font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--tp-radius-full, 9999px);
  border: 1px solid var(--tp-border-color, #e2e8f0);
  background: var(--tp-bg-surface, #ffffff);
  color: var(--tp-text-secondary, #475569);
  cursor: pointer;
  transition: all var(--tp-transition-fast);
  white-space: nowrap;
  line-height: 1.3;
}

.stocks-cat-btn:hover {
  background: var(--tp-bg-surface-subtle, #f8fafc);
  border-color: var(--tp-color-primary);
  color: var(--tp-color-primary);
  transform: translateY(-1px);
}

.stocks-cat-btn.active {
  background: var(--tp-color-primary) !important;
  border-color: var(--tp-color-primary) !important;
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

[data-theme="dark"] .stocks-cat-btn {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

[data-theme="dark"] .stocks-cat-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--tp-color-primary);
  color: #ffffff;
}

[data-theme="dark"] .stocks-cat-btn.active {
  background: var(--tp-color-primary) !important;
  border-color: var(--tp-color-primary) !important;
  color: #ffffff !important;
}

/* Global Form Controls (Inputs & Selects) */
.tp-form-control {
  background-color: var(--tp-bg-surface, #ffffff);
  border: 1px solid var(--tp-border-color, #cbd5e1);
  border-radius: var(--tp-radius-md, 8px);
  color: var(--tp-text-primary, #0f172a);
  font-family: var(--tp-font-body);
  font-size: 0.85rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color var(--tp-transition-fast), box-shadow var(--tp-transition-fast);
}

.tp-form-control:focus {
  border-color: var(--tp-color-primary) !important;
  box-shadow: 0 0 0 3px var(--tp-color-primary-subtle, rgba(37, 99, 235, 0.15)) !important;
}

[data-theme="light"] .tp-form-control,
[data-theme="light"] select.tp-form-control,
[data-theme="light"] input.tp-form-control {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="dark"] .tp-form-control,
[data-theme="dark"] select.tp-form-control,
[data-theme="dark"] input.tp-form-control {
  background-color: rgba(15, 23, 42, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

/* Table Row Action Research Button */
.tp-btn-research {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.32rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 700;
  font-family: var(--tp-font-heading);
  color: var(--tp-color-primary);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  transition: all var(--tp-transition-fast);
}

.tp-btn-research:hover {
  background: var(--tp-color-primary);
  border-color: var(--tp-color-primary);
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

.tp-btn-research svg {
  transition: transform var(--tp-transition-fast);
}

.tp-btn-research:hover svg {
  transform: translateX(2px);
}

[data-theme="dark"] .tp-btn-research {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
  color: #93c5fd;
}

[data-theme="dark"] .tp-btn-research:hover {
  background: var(--tp-color-primary);
  color: #ffffff !important;
  border-color: var(--tp-color-primary);
}

/* ==========================================================================
   PREMIUM STOCKS DIRECTORY & SCREENER TABLE SYSTEM
   ========================================================================== */

/* Responsive Table Wrapper */
.tp-table-responsive {
  overflow-x: auto;
  border-radius: var(--tp-radius-lg, 12px);
  border: 1px solid var(--tp-border-color, #e2e8f0);
  background: var(--tp-bg-surface, #ffffff);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 1.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.tp-table-responsive::-webkit-scrollbar {
  height: 6px;
}

.tp-table-responsive::-webkit-scrollbar-track {
  background: transparent;
}

.tp-table-responsive::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.tp-table-responsive::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.6);
}

[data-theme="dark"] .tp-table-responsive {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

[data-theme="dark"] .tp-table-responsive::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

/* Master Equities Table (Directory, Screener & Research Terminal) */
.tp-table-responsive > .tp-stocks-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.tp-table-responsive > .tp-stocks-table thead tr {
  background: var(--tp-bg-surface-subtle, #f8fafc);
  border-bottom: 2px solid var(--tp-border-color, #e2e8f0);
  color: var(--tp-text-muted, #64748b);
  font-size: 0.72rem;
  font-family: var(--tp-font-heading);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="dark"] .tp-table-responsive > .tp-stocks-table thead tr {
  background: rgba(30, 41, 59, 0.6);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

.tp-table-responsive > .tp-stocks-table thead th {
  white-space: nowrap;
  user-select: none;
  transition: color var(--tp-transition-fast), background var(--tp-transition-fast);
}

.tp-table-responsive > .tp-stocks-table thead th.sortable {
  cursor: pointer;
}

.tp-table-responsive > .tp-stocks-table thead th.sortable:hover {
  color: var(--tp-color-primary, #2563eb);
  background: rgba(37, 99, 235, 0.04);
}

[data-theme="dark"] .tp-table-responsive > .tp-stocks-table thead th.sortable:hover {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.08);
}

.tp-table-responsive > .tp-stocks-table tbody tr {
  border-bottom: 1px solid var(--tp-border-color, #e2e8f0);
  transition: background 0.15s ease;
}

[data-theme="dark"] .tp-table-responsive > .tp-stocks-table tbody tr {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.tp-table-responsive > .tp-stocks-table tbody tr:last-child {
  border-bottom: none;
}

.tp-table-responsive > .tp-stocks-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.035) !important;
}

[data-theme="dark"] .tp-table-responsive > .tp-stocks-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.035) !important;
}

.tp-table-responsive > .tp-stocks-table td {
  vertical-align: middle;
}

/* --------------------------------------------------------------------------
   52-WEEK RANGE ADVANCED COMPONENT (.tp-52w-widget)
   -------------------------------------------------------------------------- */
.tp-52w-widget {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
  min-width: 145px;
  max-width: 175px;
  margin: 0 auto;
  user-select: none;
}

.tp-52w-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--tp-font-mono, monospace);
  line-height: 1;
}

.tp-52w-item {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.tp-52w-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 900;
  padding: 0.1rem 0.25rem;
  border-radius: 3px;
  line-height: 1;
  letter-spacing: 0.2px;
}

.tp-52w-badge.low {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.tp-52w-badge.high {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.tp-52w-num {
  color: var(--tp-text-secondary, #475569);
  font-size: 0.68rem;
  letter-spacing: -0.2px;
}

[data-theme="dark"] .tp-52w-num {
  color: #94a3b8;
}

.tp-52w-track-wrap {
  position: relative;
  width: 100%;
  padding: 3px 0;
}

.tp-52w-track {
  position: relative;
  width: 100%;
  height: 5px;
  background: rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  overflow: visible;
}

[data-theme="dark"] .tp-52w-track {
  background: rgba(255, 255, 255, 0.1);
}

.tp-52w-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6 0%, #10b981 100%);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tp-52w-pin {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #2563eb;
  box-shadow: 0 0 4px rgba(37, 99, 235, 0.6), 0 1px 2px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  z-index: 2;
}

[data-theme="dark"] .tp-52w-pin {
  background: #0f172a;
  border-color: #60a5fa;
  box-shadow: 0 0 6px rgba(96, 165, 250, 0.8);
}


/* ==========================================================================
   INSTITUTIONAL TRADING TERMINAL & ORDER EXECUTION WIDGET
   ========================================================================== */

.tp-terminal-card {
  background: var(--tp-bg-surface, #ffffff);
  border: 1px solid var(--tp-border-color, #e2e8f0);
  border-radius: var(--tp-radius-xl, 16px);
  padding: 1.5rem;
  box-shadow: var(--tp-shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.05));
  transition: all var(--tp-transition-fast);
}

[data-theme="dark"] .tp-terminal-card {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Asset Segment Tabs (Stock vs Crypto) */
.tp-segment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.15rem;
}

.tp-segment-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--tp-radius-lg, 10px);
  font-family: var(--tp-font-heading);
  font-size: 0.825rem;
  font-weight: 700;
  border: 1.5px solid var(--tp-border-color, #e2e8f0);
  background: var(--tp-bg-surface-subtle, #f8fafc);
  color: var(--tp-text-secondary, #475569);
  cursor: pointer;
  transition: all var(--tp-transition-fast);
  user-select: none;
  text-decoration: none;
}

.tp-segment-tab:hover {
  border-color: var(--tp-color-primary);
  color: var(--tp-color-primary);
}

.tp-segment-tab.active {
  background: var(--tp-color-primary) !important;
  border-color: var(--tp-color-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

[data-theme="dark"] .tp-segment-tab {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

[data-theme="dark"] .tp-segment-tab.active {
  background: var(--tp-color-primary) !important;
  color: #ffffff !important;
}

/* Order Side Toggle (Buy vs Sell) */
.tp-order-side-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.15rem;
}

.tp-side-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--tp-radius-md, 8px);
  font-family: var(--tp-font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--tp-transition-fast);
  user-select: none;
}

.tp-side-btn.is-buy {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: #059669;
}

.tp-side-btn.is-buy.active {
  background: #10b981 !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.tp-side-btn.is-sell {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: #dc2626;
}

.tp-side-btn.is-sell.active {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

[data-theme="dark"] .tp-side-btn.is-buy {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

[data-theme="dark"] .tp-side-btn.is-sell {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* Order Type Toggle (Market vs Limit) */
.tp-order-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.15rem;
}

.tp-type-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--tp-radius-md, 8px);
  font-family: var(--tp-font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  border: 1.5px solid var(--tp-border-color, #e2e8f0);
  background: var(--tp-bg-surface-subtle, #f8fafc);
  color: var(--tp-text-secondary, #64748b);
  cursor: pointer;
  transition: all var(--tp-transition-fast);
  user-select: none;
}

.tp-type-btn:hover {
  border-color: var(--tp-color-primary);
  color: var(--tp-color-primary);
}

.tp-type-btn.active {
  background: var(--tp-color-primary-subtle, rgba(37, 99, 235, 0.12)) !important;
  border-color: var(--tp-color-primary) !important;
  color: var(--tp-color-primary) !important;
  font-weight: 800;
}

[data-theme="dark"] .tp-type-btn {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

[data-theme="dark"] .tp-type-btn.active {
  background: rgba(37, 99, 235, 0.25) !important;
  border-color: #60a5fa !important;
  color: #93c5fd !important;
}

/* Preset Quantity Pills */
.tp-qty-preset-btn {
  background: var(--tp-bg-surface-subtle, #f8fafc);
  border: 1px solid var(--tp-border-color, #e2e8f0);
  border-radius: var(--tp-radius-sm, 6px);
  padding: 0.2rem 0.55rem;
  font-size: 0.725rem;
  font-family: var(--tp-font-mono);
  font-weight: 700;
  color: var(--tp-text-secondary, #475569);
  cursor: pointer;
  transition: all var(--tp-transition-fast);
}

.tp-qty-preset-btn:hover {
  border-color: var(--tp-color-primary);
  color: var(--tp-color-primary);
  background: var(--tp-bg-surface);
}

[data-theme="dark"] .tp-qty-preset-btn {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

/* Cost & Balance Strip */
.tp-order-summary-strip {
  background: var(--tp-bg-surface-subtle, #f8fafc);
  border: 1px solid var(--tp-border-subtle, #e2e8f0);
  border-radius: var(--tp-radius-md, 8px);
  padding: 0.65rem 0.85rem;
  margin-bottom: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.775rem;
}

[data-theme="dark"] .tp-order-summary-strip {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}



