/* =========================================
   1. Reset & Base
========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--theme-bg-650);
  background-image: radial-gradient(circle at 50% 0%, var(--aura-color-3) 0%, var(--theme-bg-450) 50%);
  background-attachment: fixed;
  color: var(--defined-color, var(--theme-text-100));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

ul {
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* =========================================
   2. Typography
========================================= */
h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.3;
  font-weight: 600;
}

p {
  color: var(--defined-color, var(--theme-text-70-solid));
  font-size: clamp(1rem, 1.2vw, 1.125rem);
}

.text-sm { font-size: var(--fs-body-sm); }
.text-xs { font-size: var(--fs-body-xs); }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* =========================================
   3. Utilities & Layout
========================================= */
.container {
  max-width: 1290px;
  margin: 0 auto;
}

.main-content {
  padding: 20px 40px;
  margin: auto;
}

.section { padding-top: var(--spacing-8); }

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-8);
  max-width: 700px;
  margin-inline: auto;
}

.section-header h2 {
  margin-bottom: var(--spacing-2);
  color: var(--defined-color, var(--theme-text-100));
}

.section-header p {
  color: var(--theme-text-100);
}

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.gap-1 { gap: var(--spacing-1); }
.gap-2 { gap: var(--spacing-2); }
.gap-3 { gap: var(--spacing-3); }
.gap-4 { gap: var(--spacing-4); }

.w-100 { width: 100%; }

.data-container {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 2px;
}

/* =========================================
   4. Navbar
========================================= */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  padding: 14px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--theme-bg-400-a90);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 1000;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  color: var(--theme-text-100);
}

.logo span {
  color: var(--defined-color);
}

.logo-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--theme-color-a10);
  padding: 5PX;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--theme-text-100);
}

.logo a { 
  color: var(--theme-text-100) !important;
}

.logo a:hover{ 
  color: var(--theme-text-100) !important;
  font-weight: 600;

}

.nav-links {
  display: flex;
  gap: 34px;
}

.nav-links a {
  color: var(--theme-text-70);
  font-size: 14px;
  position: relative;
  transition: 0.3s;
}

.nav-links a:hover {
  color: var(--theme-text-100);
}

.nav-links li.active a {
  color: var(--theme-color);
  font-weight: var(--fw-bold);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--theme-color);
  transition: 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

.right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-btn {
  display: none;
  font-size: 22px;
  cursor: pointer;
}

.navbar .form__group {
  max-width: 170px;
  /* Text */
  --text-primary: var(--theme-text-light);
  --text-secondary: var(--theme-text-70);
  --placeholder-color: var(--theme-text-70);

  /* Surface */
  --surface-bg: var(--theme-bg-450);
  --surface-bg-active: var(--theme-bg-400);

  /* Border */
  --surface-border: var(--theme-text-10);
  --surface-border-active: var(--theme-color);

  /* Ripple */
  --custom-ripple-color: var(--theme-color-30);

}

.topbar__actions {
  justify-content: flex-end;
  min-width: fit-content;
  gap: clamp(12px, 1vw, 20px);
}

/* Topbar Icons */

.topbar-icons {
  display: flex;
  gap: 6px;
}

.topbar-icons__btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--theme-text-70);
  transition: background 0.2s ease, color 0.2s ease;
}

.topbar-icons__btn:hover {
  background: var(--theme-color-a20);
  color: var(--theme-color);
}

.topbar-icons__btn svg {
  width: var(--fs-icon-md);
  height: var(--fs-icon-md);
}


/* =========================================
   5. Hero Section
========================================= */
.hero {
  padding: var(--spacing-8) 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-6);
  align-items: start;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
}

.hero-content {
  max-width: 580px;
}

.hero-content h1 {
  font-family: "Poppins", sans-serif;
  font-size: clamp(2.5rem, 5vw + 1rem, 3.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-content p {
  margin: var(--spacing-2) 0 var(--spacing-3);
}

.hero-note-sm { font-size: var(--fs-body-xs); }
.hero-tagline { font-weight: var(--fw-bold); }

.hero-features {
  margin-top: var(--spacing-2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-note {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-body-xs);
  color: var(--theme-text-70-solid);
}

.hero-footer {
  margin: 30px 0;
  padding-left: 20px;
  line-height: 1.5;
  border-left: 3px solid transparent;
  border-image: linear-gradient(to top, transparent, var(--theme-color), transparent) 1;
}

.hero-footer p {
  font-size: var(--fs-body-md);
  margin: 5px 0;
  color: var(--theme-text-70-solid);
}

.hero-footer .note {
  font-size: var(--fs-body-xs);
  color: var(--theme-text-40-solid);
}

/* =========================================
   6. Dashboard & Metrics
========================================= */
.dashboard {
  position: sticky;
  top: 120px;
  border-radius: var(--radius-xl);
  background: var(--theme-bg-600);
  border: 1px solid var(--color-white-30);
  box-shadow: var(--shadow-2xl);
  overflow: hidden;
  transform-origin: right center;
  transform: perspective(1000px) translateX(0px) rotateY(-15deg) rotateX(3deg) scale(0.95);
  transition: transform var(--transition-speed-slow);
  zoom: 0.9;
}

.dashboard:hover {
  transform: perspective(1000px) rotateY(0) rotateX(0);
}

.dashboard-tabs {
  display: flex;
  gap: 8px;
  padding: var(--spacing-3) var(--spacing-4);
  border-bottom: 1px solid var(--theme-text-10);
  background: var(--theme-bg-500);
}

.tab {
  font-size: var(--fs-body-xs);
  font-weight: var(--fw-bold);
  color: var(--theme-text-70-solid);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-speed-fast);
}

.tab:hover {
  background: var(--theme-bg-400);
  color: var(--theme-text-100);
}

.tab.active {
  background: var(--theme-color);
  color: var(--theme-text-contrast);
}

.tab.active i { color: var(--theme-text-contrast); }
.dashboard-body { padding: var(--spacing-4); }

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-2);
  padding: var(--spacing-3);
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, var(--theme-color), var(--theme-color-850));
  box-shadow: var(--shadow-md);
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-1);
  margin-bottom: var(--spacing-1);
}

.chart-box {
  background: var(--theme-bg-500);
  border: 1px solid var(--theme-text-10);
  border-radius: var(--radius-lg);
  padding: var(--spacing-3);
}

.chart-box-title {
  font-size: 0.8rem;
  font-weight: var(--fw-bold);
  color: var(--theme-text-70-solid);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard .chart-box .chart {
  margin-top: 20px;
  width: 100%;
  aspect-ratio: 1.2;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-1);
}

/* STATS */
.stats-row {
  display: grid;
  /* Automatically wraps cards to the next line before they overflow */
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--spacing-1);
}

.stat-card {
  background: var(--theme-bg-500);
  border: 1px solid var(--theme-text-10);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  align-items: flex-start;
  min-width: 0; /* Prevents card from pushing past container bounds */
}

/* Allows the badge to drop below the price if space is extremely tight */
.stat-card .flex {
  flex-wrap: wrap;
  width: 100%;
}

.stat-value {
  font-weight: var(--fw-bold);
  font-size: 1.25rem;
  color: var(--theme-text-70);
}

.stat-note {
  font-size: 0.7rem;
  color: var(--theme-text-40-solid);
}

.dashboard-btn {
  width: 100%;
  margin-top: 16px;
}

/* =========================================
   7. Generic Components (Cards, Details)
========================================= */
.card {
  flex: 1;
  background-color: var(--theme-bg-450);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--theme-text-10);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 25px;
  height: 100%;
}

.card .card {
  position: relative;
  box-shadow: var(--shadow-xs);
  background: var(--theme-bg-400);
  border: 1px solid var(--theme-text-10);
}
.card .card:hover {
  box-shadow: none;
}

.card:hover { box-shadow: var(--shadow-md); }

.card .header .title { 
   text-align: left;
}

.card .header .title h4 { 
    margin: 0; 
    font-size: 0.95rem;
    font-weight: 700;
}

.card .header .title p { 
    margin: 0; 
    font-size: 0.70rem;
    font-weight: 500;
}

.card .header .icon {
    background: var(--theme-color-a10);
    --defined-color: var(--theme-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    height: fit-content;
    padding: 0.85rem;
    font-size: 0.85rem;
}

/* Card Inner Header elements */
.card .header {
    display: flex;
    justify-content: space-between;
    gap: 13px;
}

.header .title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card .header .card-actions {
    text-align: left;
    gap: 10px;
}

.card .header .card-actions .filter-btn { 
   min-width: 55px;
   --surface-bg: var(--theme-color-a5);
   --surface-bg-active: var(--theme-bg-750);
  --text-primary: var(--theme-text-100);
}

.card .header .card-actions .filter-btn.active { 
   --surface-bg: var(--theme-color);
   --text-primary: var(--theme-text-contrast)
}


.header .card-actions .score-display {
    background: linear-gradient(70deg, var(--theme-color), var(--theme-color-850));
    padding: 11px;
    border-radius: 8px;
    text-align: center;
    line-height: normal;
    --defined-color: var(--theme-text-contrast);
}

.score-display h5 {
    margin: 0;
    font-size: 0.90rem;
    font-weight: 600;
}

.score-display small {
    margin: 0;
    font-size: 0.70rem;
    font-weight: 500;
}

.card h5 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.card .para-medium {
  font-size: 0.95rem;
}

.card .para-small {
  font-size: 0.70rem;
}

.fe-card-green { --background-color: #016064; --border-color: #016064; }
.fe-card-blue { --background-color: #0e47a1; --border-color: #0e47a1; }
.fe-card-pink { --background-color: #890e4f; --border-color: #890e4f; }

.feature-card {
  --icon-color: var(--theme-text-contrast);
  --header-text-color: var(--theme-text-100);
  --para-text-color: var(--theme-text-70-solid);
  position: relative;
  text-align: left;
  padding: 50px 35px !important;
  overflow: hidden;
  border-radius: 16px;
  border: 2px solid var(--border-color);
}

.feature-card:hover { border: 2px solid var(--border-color) !important; }
.feature-card h4 { color: var(--header-text-color); }
.feature-card p { color: var(--para-text-color); }

.feature-card .feature-icon {
  background: var(--background-color);
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-card .feature-icon i { color: var(--icon-color); }

.stock-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stock-logo {
  width: 40px;
  height: 40px;
  background: var(--color-white);
  color: var(--color-dark);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: var(--fw-extrabold);
  box-shadow: var(--shadow-sm);
}

.stock-logo i { 
    color: var(--color-dark);
}

.stock-title {
  font-weight: var(--fw-bold);
  color: var(--theme-text-contrast);
  font-size: 1.1rem;
}

.stock-subtitle {
  font-size: 0.8rem;
  color: var(--theme-text-contrast-60);
}

.stock-symbol { font-weight: var(--fw-bold); }
.stock-company { font-size: var(--fs-body-xs); color: var(--theme-text-40-solid); }

.stock-details-wrapper {
  display: flex;
  gap: 18px;
  margin-bottom: 12px;
  width: fit-content;
  margin: 0 auto;
}

.stock-details { margin-bottom: 12px; }

/* =========================================
   8. Rankings & Task Lists
========================================= */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-6);
}

.top-ranking-card-wrapper {
  display: flex;
  gap: 35px;
  justify-content: center;
  margin: 42px 5px;
}

.top-ranking-card {
  text-align: center;
  width: fit-content;
  margin-top: auto;
}

.top-ranking-card .avatar {
  position: relative;
  border-radius: 50%;
  border: 3px solid var(--color-blue);
  padding: 5px;
  margin: 0 auto;
}

.top-ranking-card .avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.top-ranking-card .avatar .badge {
  position: absolute;
  bottom: 0;
  right: 50%;
  padding: 3px;
  transform: translate(50%, 50%);
}

.top-ranking-card__symbol {
  margin-top: 16px;
  margin-bottom: 4px;
  font-size: 22px;
}

.top-ranking-card__gain {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
  color: var(--color-green);
}

.avatar--rank-1 { width: 90px; height: 90px; }
.avatar--rank-other { width: 70px; height: 70px; }

.ranklist { margin-top: 18px; }
.ranklist .badge { width: fit-content; }

.task-header {
  display: grid;
  grid-template-columns: 0.7fr 4fr 1.5fr 2.5fr 2.1fr 0.4fr;
  padding: 6px 14px;
  font-size: var(--fs-body-sm);
  font-weight: 600;
  color: var(--theme-text-40-solid);
}

.task-row {
  display: grid;
  grid-template-columns: 0.7fr 4fr 1.5fr 2.5fr 2.1fr 0.4fr;
  align-items: center;
  padding: 14px 16px;
  background: var(--theme-bg-400);
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 2px;
}

.task-row:hover { background: var(--theme-bg-400); }
.task-row.active { background: var(--theme-bg-450); }
.task-row .mini-chart { width: 50px; height: 50px; }
.task-row .pot-gains { font-weight: 600; }

.task-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.task-title .stock-logo {
  height: 50px;
  width: 50px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.788);
}

.task-title .stock-logo img { width: 100%; }
.task-title .title h4 { font-size: 16px; margin: 0; font-weight: 600; }

.task-details {
  margin-bottom: 4px;
  border-left: 3px solid var(--theme-color);
  --border-radius: 0 0 10px 10px;
  --menu-bg: var(--theme-bg-500);
  --menu-item-text: var(--theme-text-100);
}

.task-details .big-radar {
  width: 360px;
  height: 265px;
  margin: 0 auto;
}

.S-No { font-weight: 700; font-size: 14px; }
.score-badge { font-family: monospace; font-weight: var(--fw-bold); color: var(--color-green); }

.priority.high { color: var(--color-red-light); }
.priority.medium { color: var(--color-yellow-light); }
.priority.low { color: var(--color-green-light); }

/* =========================================
   9. Screener & Filter Forms
========================================= */
.filters-grid { margin: 10px -0.7rem; }
.filter-group { margin-bottom: 24px; padding: 0 16px; }

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 8px;
}

.filter-label { font-size: 0.85rem; color: var(--theme-text-70-solid); font-weight: 500; }
.filter-value { font-size: 0.75rem; font-weight: 600; }

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 37px !important;
  margin-bottom: 10px !important;
}

.filter-end { justify-content: flex-end; }
.filter-labels { display: flex; justify-content: space-between; align-items: center; }
.filter-name { font-size: var(--fs-body-xs); font-weight: var(--fw-medium); color: var(--theme-text-100); }

.value-label {
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  background: var(--theme-bg-500);
}

.filter-item {
  --line-bg: var(--theme-bg-600);
  --slider-thumb:  var(--theme-color);
  --slider-thumb-hover: var(--theme-color-dark);
}

.filter-item-footer {
  justify-content: space-between;
  display: flex;
  align-items: center;
  font-size: 0.7rem;
  color: var(--theme-text-100);
}

.slider {
  appearance: none;
  width: 100%;
  height: 6px;
  --padding: 0.2rem;
  margin: 10px 0;
  border-radius: 10px;
  background: var(--line-bg);
  outline: none;
}

.slider::-webkit-slider-thumb {
  
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--slider-thumb);
  border: 4px solid var(--theme-bg-600);
  cursor: pointer;
  transition: transform var(--transition-speed-fast);
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: var(--slider-thumb-hover);
}

.slider-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  position: relative;
}

.slider-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 3px;
}

.slider-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.apply-section { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.apply-filter { display: flex; align-items: center; gap: 20px; }

.radio-group { display: flex; flex-direction: column; gap: 3px; min-width: 80px; }
.radio-label { display: flex; align-items: center; gap: 5px; font-size: var(--fs-body-xs); color: var(--theme-text-70-solid); cursor: pointer; }

.results-section h4 {
  font-size: var(--fs-body-xs);
  font-weight: var(--fw-bold);
  color: var(--theme-text-40-solid);
  letter-spacing: var(--letter-spacing-wideest);
  margin-bottom: 20px;
  margin-top: 50px;
  text-transform: uppercase;
}

.results-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.results-table th {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--theme-text-40-solid);
  text-align: left;
  padding: 8px 12px 14px;
}

.results-table td {
  background: var(--theme-bg-400);
  padding: 25px 13px;
  font-size: var(--fs-body-sm);
}

.results-table td:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.results-table td:last-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

.screener-card .unlock {
  font-size: 9pt;
  text-align: right;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  color: var(--theme-text-40-solid);
}

.screener-card .card-footer {
  width: 100%;
  display: flex;
  height: fit-content;
  align-items: end;
}

.tool-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--spacing-2);
  font-weight: 600;
  font-size: 1.25rem;
}

/* Dropdown / Select Overrides */
.card-actions { position: relative; }
.card-actions .custom-select-container {
  --padding: 0.75rem;
  --font-size: 0.75rem;
  --border-radius: 0.4rem;
  --text-primary: var(--theme-text-100);
  --surface-bg: var(--theme-color-a5);
  --surface-bg-active: var(--theme-bg-750);
  --menu-bg: var(--theme-bg-650);
  --menu-item-text: var(--theme-text-100);
  --menu-item-hover-bg: var(--theme-bg-600);
  --menu-item-active-bg: var(--theme-bg-500);
}

.card-actions .custom-select-container .select-dropdown { min-width: 135px; }

.market-rankings-leaderboard,
.screener-card {
  display: grid;
}

.market-rankings-leaderboard .range-filter {
  --text-primary: var(--theme-text-100);
  
  --surface-bg: var(--theme-color-a5);
  --surface-bg-active: var(--theme-bg-750);
  --menu-bg: var(--theme-bg-650);
  --menu-item-text: var(--theme-text-100);
  --menu-item-hover-bg: var(--theme-bg-600);
  --menu-item-active-bg: var(--theme-bg-500);
}

.section-footer {
  margin-top: auto;
}

.market-rankings-leaderboard  .controler {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .market-rankings-leaderboard  .controler .filter {
      justify-content: end;
      width: 170px;
    }

.market-rankings-leaderboard .Full-Ranking-CTA {
  width: 100%;
  font-weight: 600;
  margin-top: 10px;
}

.tasks-actions .button {
  width: 45px;
  height: 45px;
  --surface-bg: var(--theme-bg-600);
  --surface-bg-hover: var(--theme-bg-550);
  --surface-bg-active: var(--theme-bg-650);
  --text-primary: var(--theme-text-100);
  --border-radius: 50%;
}

.tasks-actions .custom-select-container {
  width: 45px;
  height: 45px;
  --border-radius: 0.4rem;
  --text-primary: var(--theme-text-100);
  --surface-bg: transparent;
  --surface-bg-active: transparent;
  --menu-bg: var(--theme-bg-650);
  --menu-item-text: var(--theme-text-100);
  --menu-item-hover-bg: var(--theme-bg-600);
  --menu-item-active-bg: var(--theme-bg-500);
}
.tasks-actions .custom-select-container .select-dropdown { min-width: 135px; }

/* =========================================
   10. Footer
========================================= */
.site-footer {
  background: var(--theme-bg-500);
  border-top: 1px solid var(--theme-text-10);
  padding: var(--spacing-6) calc(30px + 1rem);
  margin-top: var(--spacing-8);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #cbd5e1;
  font-size: 14px;
}

.brand-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 6px;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}

.footer-nav {
  display: flex;
  gap: 28px;
}

.footer-nav a {
  text-decoration: none;
  font-size: 13px;
  color: var(--theme-text-40-solid);
  position: relative;
  transition: 0.25s;
}

.footer-nav a:hover { color: var(--theme-text-100); }

.footer-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 1px;
  background: var(--theme-color);
  transition: 0.25s;
}

.footer-nav a:hover::after { width: 100%; }

/* =========================================
   11. Media Queries
========================================= */

/* Desktop to Large Tablet (991px - 1200px) */
@media (min-width: 991px) and (max-width: 1200px) {
  .top-ranking-card-wrapper { gap: 24px; margin: 30px 5px; }
  .top-ranking-card__symbol { font-size: 16px; margin-top: 12px; }
  .top-ranking-card__gain { font-size: 14px; }
  .avatar--rank-1 { width: 70px; height: 70px; }
  .avatar--rank-other { width: 55px; height: 55px; }
  .stock-details-wrapper { gap: 12px; }
  .stock-details { margin-bottom: 8px; }
  .task-header { padding: 5px 10px; font-size: 0.65rem; }
  .task-row { padding: 10px 12px; }
  .task-row .mini-chart { width: 40px; height: 40px; }
  .S-No { font-size: 11px; }
  .task-title { gap: 8px; }
  .task-title .stock-logo { width: 38px; height: 38px; }
  .task-title .title h4 { font-size: 13px; }
  .task-details .big-radar { width: 280px; height: 210px; }
  .detail-actions { gap: 8px; margin-top: 14px; }
  .filter-name { font-size: 0.6rem; }
  .value-label { font-size: 0.5rem; padding: 2px 8px; }
  .radio-group { gap: 2px; min-width: fit-content; }
  .radio-label { gap: 3px; font-size: 0.6rem; }
  .apply-filter .button { --padding: 0.6rem; --font-size: 0.7rem; }
  .results-section h4 { font-size: 0.55rem; margin-bottom: 14px; margin-top: 20px; }
  .results-table th { font-size: 9px; padding: 6px 8px 10px; }
  .results-table td { padding: 14px 10px; font-size: 0.65rem; }
  .stock-info { gap: 8px; }
  .stock-company { font-size: 0.55rem; }
  .score-badge { font-size: 0.7rem; }
  .screener-card .unlock { font-size: 8pt; }
}

/* Tablet Layout (< 992px) */
@media (max-width: 992px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: left; /* Changed from center to left */
    padding: var(--spacing-4) 15px; /* Added side padding so content doesn't touch screen edges */
  }

  .hero-content {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Changed from center to left-align the content */
    width: 100%;
  }

  .dashboard {
    transform: none;
    max-width: 100%; /* Changed from fixed 600px to avoid overflow */
    width: 100%;
    margin: 30px auto 0;
    box-sizing: border-box; /* Ensures padding/borders don't cause horizontal scroll */
  }

  .dashboard:hover {
    transform: none;
  }
  
  .compare-grid {
    grid-template-columns: 1fr;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-3);
  }

  /* Break the stats row into 2 columns on tablet before hitting mobile */
  .stats-row {
    grid-template-columns: 1fr 1fr; 
  }
}

/* Navbar / Tablet Breakpoint (< 900px) */
@media (max-width: 900px) {
  .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: var(--theme-bg-400);
    padding: 25px;
    gap: 20px;
    display: none;
  }
  .nav-links.active { display: flex; }
  .search { display: none; }
  .menu-btn { display: block; }
}

/* Mobile Breakpoint (< 768px) */
@media (max-width: 768px) {
  .nav-links,
  .search-wrapper {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  /* Stack the stats row into 1 column on smaller mobile screens to fix overflow */
  .stats-row {
    grid-template-columns: 1fr;
  }
  
  .metric-grid {
    grid-template-columns: 1fr;
  }
  
  .footer {
    flex-direction: column;
    gap: var(--spacing-4);
    text-align: center;
  }

  /* --- SPECIFIC MOBILE HERO FIXES --- */

  /* Reduce font size for the lists so they fit better */
  .hero-features {
    font-size: 0.85rem; 
  }

  /* Target the long "How SPS Works" item to ensure it fits cleanly */
  .hero-features .step.level-4 {
    font-size: 0.75rem; 
    display: flex;
    flex-wrap: wrap; /* Allows text to wrap naturally if it's too long */
    align-items: center;
    gap: 4px;
    line-height: 1.4;
  }

  /* Fix for "Built on documented..." footer section alignment */
  .hero-footer {
    padding-left: 15px;
    margin: 20px 0;
    text-align: left;
    width: 100%;
  }
  
  .hero-footer p {
    font-size: 0.9rem; /* Slightly smaller for mobile readability */
  }
}

/* Small Mobile Breakpoint (< 640px) */
@media (max-width: 640px) {
  .footer-inner { flex-direction: column; gap: 14px; }
}





/* =========================
   COMPONENT: ta-signal
========================= */
.ta-signal {
  --ta-card-bg: var(--theme-bg-400);
 --glow: var(--theme-color-a20);
 --color: var(--theme-color);

  background: var(--ta-card-bg);
  border: 2px solid var(--glow);
  border-radius: 8px;
  padding: 15px;
}

.ta-signal .header {
  justify-content: space-between;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.ta-signal .header h5 { 
  color: var(--theme-text-100);
  font-size: 12pt;
}

.ta-signal .header i { 
  color: var(--color);
  font-size: 14pt;
}

.ta-signal .value {
  color: var(--color);
  font-size: 16pt;
  font-weight: bold;
  margin-bottom: 7px;
}

.ta-signal .info { 
  color: var(--theme-text-70-solid);
  font-size: 9pt;
}

.ta-signal .badge {
  --full : var(--color);
  --half : var(--glow);
  background: var(--half);
  color: var(--full);
  border-radius: 2px;
  padding: 10px;
  border: 1px solid var(--full);
}

.ta-signal .badge.primary { 
  --full : var(--color-blue);
  --half : var(--color-blue-20);
}

.ta-signal .badge.success { 
  --full : var(--color-green);
  --half : var(--color-green-20);
}

.ta-signal .badge.danger { 
  --full : var(--color-red);
  --half : var(--color-red-20);
}

.ta-signal .badge.warning { 
  --full : var(--color-yellow);
  --half : var(--color-yellow-20);
}

/* ==== COLOR VARIANTS ==== */
.ta-signal.primary {
  --color: var(--color-blue);
  --glow: var(--color-blue-20);
}

.ta-signal.success {
  --color: var(--color-green);
  --glow: var(--color-green-20);
}

.ta-signal.warning {
  --color: var(--color-yellow);
  --glow: var(--color-yellow-20);
}

.ta-signal.danger {
  --color: var(--color-red);
  --glow: var(--color-red-20);
}


.explorer-section .accordion {
  --surface-bg: var(--theme-bg-400);
  --surface-border: var(--theme-text-10);
  --text-primary: var(--theme-text-100);
  --surface-bg-hover: var(--themebg-450);
  --text-hover: var(--theme-text-100);
  --surface-bg-active: var(--theme-bg-400);
}

.explorer-section .accordion 
.accordion-header[aria-expanded="true"] { 
 border-radius: 8px 8px 0 0;
}

.explorer-section .expandable-item .expandable-panel { 
  background: var(--theme-bg-400);
  box-shadow: inset 0 0 0 1.5px var(--surface-border);
  border-radius: 0 0 8px 8px;
  padding: 0;
}

.explorer-section .accordion-item:not(:last-child) {
  margin-bottom: 10px;
}

.accordion-title .header {
  align-items: center;
}

.accordion-title .header h5 { 
  margin-bottom: 4px;
}

.accordion-title .header .icon {
  --accordion-i-bg: var(--theme-color);
  --i-color: var(--theme-text-contrast);

  background: var(--accordion-i-bg);
  color: var(--i-color);
  padding: 0.71rem;
  font-size: 0.70rem;
  width: 36px;
  height: 36px;
}

.accordion-title .header .icon i { 
  color: var(--i-color);
}

.explorer-section .table {
  width: 100%;
  border-collapse: collapse;
}

.explorer-section .table thead {
  background-color: var(--theme-color-a5);
  border-top: none;
}

.explorer-section .table th {
  padding: 1.2rem 1.5rem;
}

.explorer-section .table td {
  padding: 0.95rem 1.5rem;
}

.explorer-section .table th,
.explorer-section .table td {
  border-bottom: 1px solid var(--theme-bg-500);
  font-size: var(--fs-body-sm);
  text-align: left;
}

.explorer-section .expandable-trigger[aria-expanded="true"] + .expandable-panel {
  max-height: fit-content;
}

.explorer-section .table tbody tr:last-child td {
  border-bottom: none;
}

.explorer-section .table .badge {
  min-width: 90px;
}
