/* ============================================================================ */
/* SEARCH / HEADER CONTROLS */
/* ============================================================================ */

.search-stocks {
  width: 100%;
  max-width: 400px;
  --padding: 0.75rem;
  --font-size: 0.75rem;
  --border-radius: 0.4rem;
  --surface-bg: var(--theme-bg-400);
  --surface-bg-active: var(--theme-bg-450);
  --text-primary: var(--theme-text-100);
  --menu-bg: var(--theme-bg-450);
}

.search-stocks .form__group {
  width: 100%;
  --text-primary: var(--theme-text-light);
  --text-secondary: var(--theme-text-70);
  --placeholder-color: var(--theme-text-70);
  /* Surface */
  --surface-bg: var(--theme-bg-400);
  --surface-bg-active: var(--theme-bg-400);
}

/* Ranking Banner */

.rank-banner-container {
  width: 100%;
  max-width: 100%;
  min-height: 120px;
  margin-top: 30px;
}

.rank-banner {

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  border-radius: 16px;
  background: radial-gradient(circle, var(--theme-color), var(--theme-color-950));
  color: white;
  position: relative;
  overflow: hidden;
}

/* left section */

.rank-left {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  max-width: 700px;
}

/* icon */

.rank-icon {
  min-width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-yellow), var(--color-yellow-light));
  font-size: 26px;
}

.rank-icon i {
  --defined-color: var(--theme-text-contrast);
}

/* text */

.rank-text h2 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  --defined-color: var(--theme-text-contrast);
}

.rank-text p {
  font-size: 14px;
  margin-top: 6px;
  --defined-color: var(--theme-text-contrast-90);
}

.rank-text p strong {
  font-size: 15px;
  --defined-color: var(--theme-text-contrast);
}

/* highlight */

.highlight {
  color: var(--color-yellow-light);
  font-weight: 700;
}

/* ---------- TABLET ---------- */

@media (max-width: 900px) {
  .rank-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
  }

  .rank-left {
    max-width: 100%;
  }
}

/* ---------- MOBILE ---------- */

@media (max-width: 600px) {
  .rank-left {
    flex-direction: column;
    align-items: flex-start;
  }

  .rank-icon {
    width: 50px;
    height: 50px;
    font-size: 22px;
  }

  .rank-text h2 {
    font-size: 18px;
  }

  .rank-text p {
    font-size: 13px;
  }

  .rank-btn {
    width: 100%;
    text-align: center;
    padding: 12px 18px;
  }
}

/* --- 16. Tabs (Navigation/Analysis) --- */

.analysis-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 50px;
  padding: 6px 0;
  border-bottom: 2px solid var(--theme-text-10);
}

.analysis-tab {
  position: relative;
  padding: 10px 18px;
  border: none;
  background: var(--theme-bg-400);
  color: var(--theme-text-100);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.analysis-tab i {
  color: var(--theme-color);
}

.analysis-tab:hover,
.analysis-tab.active {
  font-weight: 600;
}

.analysis-tab::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--theme-color);
  transition: 0.35s;
  border-radius: 10px;
}

.analysis-tab.active::after {
  width: 100%;
}

@media (max-width: 768px) {

  .search-stocks {
    width: 100%;
    max-width: 100%;
    margin-bottom: 30px;
  }

  .analysis-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
  }
}

/* ============================================================================ */
/* BADGES & RANKING CARDS */
/* ============================================================================ */

.top-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  background: var(--Badge-bg);
  color: var(--text-color, var(--theme-text-100));
  font-size: 12px;
  padding: 6px 12px;
  margin: 0 auto;
  border: 2px solid var(--border-color);
  border-radius: 20px;
  font-weight: 600;
  margin-bottom: 0px;
}

.top-badge i {
  color: var(--text-color);
}

.badge-bronze {
  --Badge-bg: linear-gradient(135deg, #996f5d, #f1d7c6, #996f5d);
  --border-color: #996f5d;
  --text-color: #442e21;
}

.badge-silver {
  --Badge-bg: linear-gradient(135deg, #c0c0c0, #ebebeb, #c0c0c0);
  --border-color: #c0c0c0;
  --text-color: #474747;
}

.badge-gold {
  --Badge-bg: linear-gradient(135deg, #ec9d0f, #fae508, #ec9d0f);
  --border-color: #ec9d0f;
  --text-color: #8f4e0e;
}

.badge-platinum {
  --Badge-bg: linear-gradient(135deg, #e5e4e2, #ffffff, #e5e4e2);
  --border-color: #e5e4e2;
  --text-color: #555555;
}

.badge-diamond {
  --Badge-bg: linear-gradient(135deg, #b9f2ff, #f1d7c6, #b9f2ff);
  --border-color: #b9f2ff;
  --text-color: #4a8e8e;
}

/* ============================================================================ */
/* STOCK RANKING SECTION */
/* ============================================================================ */

.stock-ranking-section {
  flex-grow: 1;
  margin-top: 25px;
}

.stock-ranking-section .ranking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 15px;
}

.stock-ranking-section .ranking-header .header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stock-ranking-section .ranking-header .header-left span {
  margin: 0;
  font-size: 13px;
}

.stock-ranking-section .ranking-header .header-left .fa-ribbon {
  color: var(--color-yellow-dark);
}

.stock-ranking-section .sub-text {
  color: var(--theme-text-70);
  font-size: 13px;
  font-weight: 500;
}

.stock-ranking-section .ranking-cards-wrapper {
  margin-bottom: 24px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.stock-ranking-section .ranking-cards-wrapper::-webkit-scrollbar {
  display: none;
}

.stock-ranking-section .ranking-cards {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 10px 4px;
  scroll-snap-type: x mandatory;
}

.stock-ranking-section .ranking-cards-wrapper .rank-card {
  flex: 1;
  min-width: 120px;
  scroll-snap-align: center;
  border: 1px solid var(--theme-text-10);
  border-radius: 16px;
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--theme-bg-400);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.stock-ranking-section .ranking-cards-wrapper .rank-card:hover:not(.active) {
  transform: translateY(-5px);
  box-shadow: var(--shadow-sm);
}

.stock-ranking-section .ranking-cards-wrapper .rank-card.active {
  background: linear-gradient(145deg, var(--theme-color-a5), var(--theme-color-a10));
  border: 2px solid var(--theme-color);
  box-shadow: 0 8px 25px -5px var(--theme-color-a30);
  transform: scale(1.03);
}

.stock-ranking-section .ranking-cards-wrapper .logo-circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-white);
  border: 1px solid var(--theme-text-10);
  margin-bottom: 14px;
  padding: 10px;
  font-size: 24px;
}

.stock-ranking-section .ranking-cards-wrapper .rank-card.active .logo-circle {
  background: var(--color-white);
  box-shadow: var(--shadow-xs);
}

.stock-ranking-section .ranking-cards-wrapper .logo-circle img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.stock-ranking-section .ranking-cards-wrapper .rank-name {
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}

.stock-ranking-section .ranking-cards-wrapper .rank-num {
  font-size: 12px;
  color: var(--theme-text-70);
  font-weight: 600;
  background: var(--theme-bg-650);
  padding: 2px 10px;
  border-radius: 12px;
}

.stock-ranking-section .ranking-cards-wrapper .rank-card.active .rank-name {
  color: var(--theme-color-dark);
}

.stock-ranking-section .ranking-cards-wrapper .rank-card.active .rank-num {
  background: var(--theme-color-a20);
  color: var(--theme-color-dark);
}

/* ============================================================================ */
/* PRICE SCENARIOS & RIGHT CARD FLEX */
/* ============================================================================ */

.right-card-flex {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.icon-circle-small {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--theme-color);
}

.icon-circle-small i {
  --defined-color: var(--theme-text-contrast);
}

.scenarios-container {
  flex-grow: 1;
  /* Pushes the content to fill available space */
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: 12px;
}

.scenario-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--boader-color, var(--theme-text-10));
  background: var(--bg-color, var(--theme-bg-400));
}

.scenario-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.scenario-center {
  flex: 3;
}

.progress-bar-container {
  height: 8px;
  background-color: var(--theme-bg-700);
  border-radius: 20px;
  overflow: hidden;
}

.scenario-row .progress-bar {
  height: 100%;
  border-radius: 20px;
}

/* --- Scenario Theme Colors --- */
.scenario-row.success-theme {
  --boader-color: var(--color-green);
  --bg-color: var(--color-green-10);
}

.scenario-row.primary-theme {
  --boader-color: var(--color-blue);
  --bg-color: var(--color-blue-10);
}

.scenario-row.danger-theme {
  --boader-color: var(--color-red);
  --bg-color: var(--color-red-10);
}

.scenario-row.success-theme .scenario-left i,
.scenario-row.success-theme .label {
  color: var(--color-green);
  font-weight: 700;
}

.scenario-row.success-theme .progress-bar {
  background: linear-gradient(90deg, var(--color-green-light), var(--color-green));
}

.scenario-row.primary-theme .scenario-left i,
.scenario-row.primary-theme .label {
  color: var(--color-blue);
  font-weight: 700;
}

.scenario-row.primary-theme .progress-bar {
  background: linear-gradient(90deg, var(--color-blue-light), var(--color-blue));
}

.scenario-row.danger-theme .scenario-left i,
.scenario-row.danger-theme .label {
  color: var(--color-red);
  font-weight: 700;
}

.scenario-row.danger-theme .progress-bar {
  background: linear-gradient(90deg, var(--color-red-light), var(--color-red));
}

.scenario-right {
  flex: 1.5;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.scenario-right .price {
  font-size: 20px;
  font-weight: 700;
}

.scenario-right .change {
  font-size: 12px;
  font-weight: 600;
}

.sps-card-divider {
  border: 0;
  border-top: 1px solid var(--theme-text-10);
  margin: 24px 0;
}

/* ============================================================================ */
/* RISK ASSESSMENT & RATINGS */
/* ============================================================================ */

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.section-header h5 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
}

.risk-assessment-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.risk-gauge-container {
  width: 100%;
  height: fit-content;
}

.risk-gauge-container .chart {
  width: 100%;
  max-width: 250px;
  margin: auto;
  aspect-ratio: 1.15;
}

.ratings-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ratings-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--theme-text-70);
  font-weight: 500;
}

/* --- Rating Stars --- */
.rating-stars {
  display: flex;
  gap: 4px;
  font-size: 7px;
}

.rating-stars .fa-star,
.rating-stars .fa-star-half-stroke {
  color: var(--color-green);
}

.rating-stars.warning-rating .fa-star,
.rating-stars.warning-rating .fa-star-half-stroke {
  color: var(--color-yellow);
}

.rating-stars.danger-rating .fa-star,
.rating-stars.danger-rating .fa-star-half-stroke {
  color: var(--color-red);
}

.rating-stars.success-rating .fa-star,
.rating-stars.success-rating .fa-star-half-stroke {
  color: var(--color-green);
}

.rating-stars .fa-star.empty-dot {
  color: var(--theme-text-20);
  font-size: 7px;
}

/* ============================================================================ */
/* KEY METRICS, CONSENSUS & QUICK METRICS */
/* ============================================================================ */

.metrics-grid {
  margin-top: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.metric-box {
  background: var(--theme-bg-400);
  border: 1px solid var(--theme-text-10);
  border-radius: 12px;
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-top: 10px;
}

/* Hover Effect par halka blue glow */
.metric-box:hover {
  border-color: var(--theme-color-a50);
  background: var(--theme-color-a5);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.metric-title {
  font-size: 12px;
  color: var(--theme-text-70);
  font-weight: 500;
  margin-bottom: 6px;
}

.metric-value {
  font-size: 18px;
  font-weight: 700;
}

/* Wall Street Consensus Modern Stacked Bar */
.consensus-wrapper {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 15px;
  flex-grow: 1;
}

.stacked-bar-container {
  width: 100%;
}

.consensus-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.consensus-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.consensus-label {
  width: 70px;
  font-weight: 700;
  color: var(--theme-text-90);
  display: flex;
  align-items: center;
  gap: 8px;
}

.consensus-bar {
  flex: 1;
  height: 12px;
  background: var(--theme-bg-700);
  border-radius: 10px;
  overflow: hidden;
}

.consensus-fill {
  height: 100%;
  transition: width 0.6s ease;
}

.consensus-fill.buy {
  background: var(--color-green);
}

.consensus-fill.hold {
  background: var(--color-yellow);
}

.consensus-fill.sell {
  background: var(--color-red);
}

.consensus-count {
  width: 36px;
  text-align: right;
  font-weight: 700;
  color: var(--theme-text-100);
}

.consensus-stats {
  display: flex;
  justify-content: space-between;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--theme-text-100);
}

.stat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-buy {
  background: var(--color-green);
}

.dot-hold {
  background: var(--color-yellow);
}

.dot-sell {
  background: var(--color-red);
}

.avg-target-box {
  text-align: center;
  margin-top: auto;
}

.avg-target-box span {
  font-size: 10px;
  color: var(--theme-text-70);
  font-weight: 500;
}

.avg-target-box h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--theme-text-100);
  margin: 3px 0;
}

.avg-target-box #avg-target-pct {
  color: var(--defined-color);
  font-size: 14px;
  font-weight: 600;
  margin-left: 8px;
}

/* Quick Metrics Clean List */
.quick-metrics-list {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
  flex-grow: 1;
  justify-content: space-evenly;
}

.qm-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px dashed var(--theme-text-10);
}

.qm-item:last-child {
  border-bottom: none;
}

.qm-label {
  font-size: 10px;
  color: var(--theme-text-70);
  font-weight: 500;
}

.qm-val {
  font-size: 10px;
  color: var(--theme-text-100);
  font-weight: 600;
}

/* ============================================================================ */
/* BANNER THEMING & UPGRADE PROMOS */
/* ============================================================================ */

.upgrade-banner {
  --banner-bg-color: #ffa80017;
  --banner-border-color: #ff5500;
  --banner-glow-rgb: 255, 153, 0;
  --banner-grad-start: #ffb300;
  --banner-grad-end: #ff7700;
  --banner-feat-icon-color: #ff7700;
  --banner-feat-border: #ffa200d0;
  /* Base Layout */
  align-items: center;
  background: var(--theme-bg-400);
  background-color: var(--banner-bg-color);
  border-radius: 20px;
  border: 3px solid var(--banner-border-color);
  margin: 40px 0;
  padding: var(--spacing-3);
  /* Dynamic Shadows */
  box-shadow: 0 10px 30px rgba(var(--banner-glow-rgb), 0.08);
  transition:
    transform var(--transition-speed-normal) var(--ease-out-cubic),
    box-shadow var(--transition-speed-normal) var(--ease-out-cubic);
  will-change: transform, box-shadow;
}

/* 🟣 PURPLE THEME (Expert) */
.upgrade-banner.theme-purple {
  --banner-bg-color: rgba(139, 92, 246, 0.05);
  --banner-border-color: #7e22ce;
  --banner-glow-rgb: 139, 92, 246;
  --banner-grad-start: #a855f7;
  --banner-grad-end: #7e22ce;
  --banner-feat-icon-color: #9333ea;
  --banner-feat-border: rgba(146, 51, 234, 0.699);
}

/* Banner Hover */
.upgrade-banner:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(var(--banner-glow-rgb), 0.15);
}

/* =========================================
   Left Section & Main Icon
========================================= */
.upgrade-banner .banner-info {
  display: flex;
  gap: var(--spacing-2);
  margin-bottom: var(--spacing-3);
}

.upgrade-banner .main-icon {
  /* Dynamic Gradient */
  background: linear-gradient(135deg, var(--banner-grad-start), var(--banner-grad-end));
  --defined-color: var(--color-white);
  min-width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(var(--banner-glow-rgb), 0.2);
  flex-shrink: 0;
  transition:
    transform var(--transition-speed-normal) var(--ease-spring),
    box-shadow var(--transition-speed-normal) var(--ease-out-cubic);
}

.upgrade-banner:hover .main-icon {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 8px 25px rgba(var(--banner-glow-rgb), 0.4);
}

/* Text Animations */
.upgrade-banner h4 {
  font-weight: var(--fw-bold);
  margin-bottom: var(--spacing-1);
  margin-top: 0;
  transition: transform var(--transition-speed-normal) var(--ease-out-cubic);
  transform-origin: left center;
}

.upgrade-banner p {
  margin-bottom: 0;
  font-size: var(--fs-body-sm);
  color: var(--theme-text-70-solid);
  transition: transform var(--transition-speed-normal) var(--ease-out-cubic);
  transform-origin: left center;
}

.upgrade-banner:hover h4 {
  transform: scale(1.04);
  transition-delay: 0.05s;
}

.upgrade-banner:hover p {
  transform: translateX(2px);
  transition-delay: 0.05s;
}

/* Optional: Small Badge from Image */
.upgrade-banner .feature-badge {
  display: inline-block;
  background-color: #fff3e0;
  color: #ff7700;
  font-size: 0.7rem;
  font-weight: var(--fw-bold);
  padding: 4px 10px;
  border-radius: 20px;
  margin-top: 8px;
  border: 1px solid #ffdcb0;
}

/* =========================================
   Center Section: Features
========================================= */
.upgrade-banner .banner-features {
  display: flex;
  justify-content: center;
  gap: var(--spacing-1);
  margin-bottom: var(--spacing-3);
}

.upgrade-banner .feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 98px;
  text-align: center;
  transition: transform var(--transition-speed-normal) var(--ease-spring);
}

.upgrade-banner:hover .feature-item {
  transform: scale(1.06);
}

.upgrade-banner:hover .feature-item:nth-child(1) {
  transition-delay: 0.1s;
}

.upgrade-banner:hover .feature-item:nth-child(2) {
  transition-delay: 0.15s;
}

.upgrade-banner:hover .feature-item:nth-child(3) {
  transition-delay: 0.2s;
}

.upgrade-banner:hover .feature-item:nth-child(4) {
  transition-delay: 0.25s;
}

/* In case of 4 items */

.upgrade-banner .feature-icon {
  background: var(--theme-bg-500);
  /* Dynamic Feature Colors */
  --defined-color: var(--banner-feat-icon-color);
  color: var(--banner-feat-icon-color);
  border: 2px solid var(--banner-feat-border);

  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.upgrade-banner .feature-text {
  font-size: 0.75rem;
  line-height: var(--line-height-tight);
  color: var(--theme-text-100);
  font-weight: var(--fw-bold);
}

/* =========================================
   Right Section: CTA Button
========================================= */
.upgrade-banner .banner-cta {
  text-align: center;
  margin-top: var(--spacing-2);
}

.upgrade-banner .btn-upgrade {
  /* Dynamic Button Gradient */
  background: linear-gradient(135deg, var(--banner-grad-start), var(--banner-grad-end));
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  box-shadow: 0 4px 15px rgba(var(--banner-glow-rgb), 0.3);
  font-weight: var(--fw-bold);
  width: 100%;
  transition:
    transform var(--transition-speed-normal) var(--ease-spring),
    box-shadow var(--transition-speed-normal) var(--ease-out-cubic),
    filter var(--transition-speed-normal) var(--ease-out-cubic);
}

.upgrade-banner:hover .btn-upgrade {
  transform: scale(1.08);
  box-shadow: 0 8px 25px rgba(var(--banner-glow-rgb), 0.5);
  filter: brightness(1.05);
  transition-delay: 0.25s;
}

.upgrade-banner .btn-upgrade:hover {
  transition-delay: 0s !important;
  transform: scale(1.1) !important;
  box-shadow: 0 6px 20px rgba(var(--banner-glow-rgb), 0.4);
  filter: brightness(1.1);
}

/* ============================================================================ */
/* STOCK HEADER */
/* ============================================================================ */

.stock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
  background: none;
  padding: 24px 0;
  border-radius: 16px;
}

.stock-header .stock-right {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.stock-header .performance {
  display: flex;
  gap: 25px;
}

.stock-header .performance .label {
  display: block;
  font-size: 13px;
  color: var(--theme-text-100);
}

/* Replaced green colors with variables */
.stock-header .gain,
.stock-header .price-change,
.stock-header .text-success {
  --color: var(--color-green);
  color: var(--color);
  font-weight: 600;
}

.stock-header .gain.primary {
  --color: var(--color-blue)
}

.stock-header .gain.success {
  --color: var(--color-green)
}

.stock-header .gain.danger {
  --color: var(--color-red)
}

.stock-header .gain.warning {
  --color: var(--color-yellow)
}

.stock-header .price-block {
  text-align: right;
}

.stock-header .price {
  font-size: 28px;
  font-weight: 700;
  color: var(--theme-text-100);
}

.price-change {
  font-size: 14px;
}

.stock-header .watchlist {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.stock-header.watch-btn {
  width: 100%;
}

.stock-header .watchlist a {
  font-size: 13px;
  color: var(--theme-color);
  text-decoration: none;
}

/* responsive */

@media (max-width: 768px) {
  .stock-header {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 18px;
  }

  /* Top section */
  .stock-header .stock-profile {
    align-items: center;
    gap: 14px;
  }

  .stock-header .stock-profile .stock-logo {
    --sp-logo-size: 48px;
    --sp-logo-radius: 10px;
    --sp-icon-size: 22px;
  }

  .stock-header .stock-profile .stock-title {
    --sp-title-size: 20px;
  }

  .stock-header .stock-profile .stock-meta {
    --sp-meta-size: 12px;
  }

  /* Right section becomes stacked */
  .stock-header .stock-right {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  /* Performance inline but spaced */
  .stock-header .performance {
    justify-content: space-between;
    gap: 10px;
  }

  .stock-header .performance div {
    text-align: center;
    flex: 1;
  }

  /* Price centered for visual focus */
  .stock-header .price-block {
    text-align: center;
  }

  .stock-header .price {
    font-size: 24px;
  }

  .stock-header .price-change {
    font-size: 13px;
  }

  /* Watchlist full width button */
  .stock-header .watchlist {
    align-items: stretch;
    width: 100%;
  }

  .stock-header .watch-btn {
    width: 100%;
  }

  .stock-header .watchlist a {
    text-align: center;
  }
}

/* ============================================================================ */
/* CORE ANALYSIS METRICS */
/* ============================================================================ */

.core-analysis,
.right-card-flex {
  min-height: 400px;
}

.core-analysis .row .card {
  text-align: center;
  margin-top: 1rem;
  height: stretch;
}

.card .core-analysis-chart {
  width: 100%;
  aspect-ratio: 1.2;
  min-height: 160px;
  flex-grow: 1;
  /* Chart takes space */
}

/* Target Price Elements */
.target-price-chart {
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
}

.target-price-chart .target-price {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
}

.row-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.row-info {
  width: 140px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress {
  display: flex;
  height: 1.5rem;
  overflow: hidden;
  width: 100%;
  background-color: var(--color-blue-10);
  border-radius: 8px;
  margin-bottom: 15px;
}

.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  --background-color: var(--theme-color);
  background-color: var(--background-color);
  font-size: 0.75rem;
  transition: width 0.6s ease;
}

.progress-bar.progress-success {
  --background-color: var(--color-green);
}

.progress-bar.progress-warning {
  --background-color: var(--color-yellow);
}

.progress-bar.progress-danger {
  --background-color: var(--color-red);
}

.progress-bar.progress-neutral {
  --background-color: var(--theme-color);
}

.progress-bar.progress-primary {
  --background-color: var(--color-blue);
}

/* Upside Badge */
.upside-badge {
  display: inline-flex;
  align-items: center;
  width: 100%;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  --background-color: var(--color-green-30);
  --border-color: var(--color-green-60);
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--color-green-dark);
}

.badge-icon {
  font-size: var(--fs-icon-lg);
  --color-icon: var(--color-green-dark);
  color: var(--color-icon);
}

.upside-badge.success {
  --background-color: var(--color-green-30);
  --border-color: var(--color-green-60);
}

.upside-badge.success .badge-icon {
  --color-icon: var(--color-green-dark);
}

.upside-badge.danger {
  --background-color: var(--color-red-30);
  --border-color: var(--color-red-60);
}

.upside-badge.danger .badge-icon {
  --color-icon: var(--color-red-dark);
}

.upside-badge.warning {
  --background-color: var(--color-yellow-30);
  --border-color: var(--color-yellow-60);
}

.upside-badge.warning .badge-icon {
  --color-icon: var(--color-yellow-dark);
}

.upside-badge.primary {
  --background-color: var(--color-blue-30);
  --border-color: var(--color-blue-60);
}

.upside-badge.primary .badge-icon {
  --color-icon: var(--color-blue-dark);
}

.upside-badge.warning .badge-icon {
  --color-icon: var(--color-yellow-dark);
}

.badge-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.text {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
}

/* ============================================================================ */
/* SPS COMPARISON MATRIX */
/* ============================================================================ */

.sps-matrix-wrapper {
  width: 100%;
  height: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background-color: var(--theme-bg-400);
  border-radius: var(--radius-lg, 16px);
  border: 1px solid var(--theme-text-10);
  box-shadow: var(--shadow-xs);
  flex: 1;
  display: flex;
  flex-direction: column;

  /* MAGIC: Container query setup for fluid fonts */
  container-type: inline-size;
}

.sps-matrix-table {
  width: 100%;
  min-width: 800px;
  /* Forces scroll on mobile to protect layout */
  height: 100%;
  border-collapse: separate;
  border-spacing: 1px 0;
  /* horizontal gap between columns */
}

.sps-matrix-table th,
.sps-matrix-table td {
  /* FLUID PADDING: Scales smoothly based on container width */
  padding: clamp(14px, 2.5cqw, 20px) clamp(12px, 2cqw, 20px);
  text-align: center;
  border-bottom: 1px solid var(--theme-text-10);
  /* FLUID FONT: Min 11px, Ideal 1.5% of width, Max 14px */
  font-size: clamp(11px, 1.5cqw, 14px);
  vertical-align: middle;
}

/* STICKY COLUMN FIX FOR MOBILE */
.sps-matrix-table th:first-child,
.sps-matrix-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 10;
  background-color: var(--theme-bg-400);
  text-align: left;
  border-right: 1px solid var(--theme-text-10);
  font-weight: 500;
  color: var(--theme-text-70);
}

.sps-matrix-table table td:nth-child(3),
.sps-matrix-table table th:nth-child(3),
.sps-matrix-table table td:nth-child(5),
.sps-matrix-table table th:nth-child(5) {
  background-color: rgba(40, 255, 0, 0.04);
}

.sps-matrix-table table td:nth-child(4),
.sps-matrix-table table th:nth-child(4) {
  background-color: rgba(0, 60, 255, 0.04);
}

.sps-matrix-table tbody tr:last-child {
  height: 100%;
}

/* ============================================================================ */
/* HIGHLIGHTED ACTIVE COLUMN */
/* ============================================================================ */

.table-col-highlight {
  border-top: 2px solid var(--theme-color);
  border-left: 2px solid var(--theme-color);
  border-right: 2px solid var(--theme-color);
  border-bottom: none;
  background: linear-gradient(90deg, var(--theme-color-a5) 0%, var(--theme-color-a6) 50%);
}

td.table-col-highlight {
  background: linear-gradient(90deg, var(--theme-color-a5) 0%, var(--theme-color-a6) 50%);
  border-top: 1px solid var(--theme-text-10);
  border-left: 2px solid var(--theme-color);
  border-right: 2px solid var(--theme-color);
  border-bottom: 1px solid var(--theme-text-10);
  border-radius: 0px;
}

td.table-col-highlight.last {
  border-bottom: 2px solid var(--theme-color);
}

/* =======================================================
   Inner Matrix Components (Headers & Details)
======================================================== */
.header-company {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px, 1cqw, 8px);
}

.header-logo {
  width: clamp(38px, 5cqw, 44px);
  height: clamp(38px, 5cqw, 44px);
  border-radius: 12px;
  background: var(--theme-bg-400);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--theme-text-10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(18px, 3cqw, 22px);
}

.header-name {
  font-size: clamp(12px, 1.8cqw, 14px);
  font-weight: 700;
  color: var(--theme-text-100);
  margin-bottom: 2px;
}

.header-ticker {
  font-size: clamp(9px, 1cqw, 10px);
  color: var(--theme-text-70);
  font-weight: 500;
  background: var(--theme-bg-650);
  padding: 2px 8px;
  border-radius: 6px;
}

/* Score Display with Mini Bar */
.score-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.score-box .val {
  font-size: clamp(14px, 2.5cqw, 18px);
  font-weight: 800;
}

.score-box .mini-bar-bg {
  width: clamp(45px, 8cqw, 60px);
  height: 4px;
  background: var(--theme-bg-700);
  border-radius: 4px;
  overflow: hidden;
}

.score-box .mini-bar-fill {
  height: 100%;
  border-radius: 4px;
}

/* Score Box Colors */
.score-box.success .val {
  color: var(--color-green);
}

.score-box.primary .val {
  color: var(--color-blue);
}

.score-box.warning .val {
  color: var(--color-yellow);
}

.score-box.danger .val {
  color: var(--color-red);
}

.score-box.success .mini-bar-fill {
  background: var(--color-green);
}

.score-box.primary .mini-bar-fill {
  background: var(--color-blue);
}

.score-box.warning .mini-bar-fill {
  background: var(--color-yellow);
}

.score-box.danger .mini-bar-fill {
  background: var(--color-red);
}

/* Ticker Price Style */
.price-ticker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.price-ticker .perc {
  font-size: clamp(11px, 1.8cqw, 13px);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.price-ticker .amt {
  font-size: clamp(10px, 1.5cqw, 12px);
  color: var(--theme-text-70);
  font-weight: 600;
}

/* Status Text Colors */
.text-excellent {
  color: var(--color-green-light);
  font-weight: 600;
}

.text-good {
  color: var(--color-green);
  font-weight: 500;
}

.text-fair {
  color: var(--color-yellow);
  font-weight: 500;
}

.text-poor {
  color: var(--color-red);
  font-weight: 500;
}

.text-vpoor {
  color: var(--color-red-light);
  font-weight: 600;
}

/* =========================
   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 {
  text-align: center;
  color: var(--theme-text-70-solid);
  margin-top: 3rem;
  font-size: 9pt;
}

.info .widget-title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.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.7rem;
  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;
}


/* ============================================================================ */
/* FUNDAMENTALS & RADAR LEGENDS */
/* ============================================================================ */

.fund-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--theme-text-10);
  font-size: 12px;
}

.fund-item:last-child {
  border-bottom: none;
}

.custom-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 15px;
  font-family: system-ui, sans-serif;
}

.legend-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--theme-text-70, #64748b);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.legend-item:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.legend-item.disabled {
  opacity: 0.4;
  filter: grayscale(100%);
}

.legend-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.dot-stock {
  background-color: #a855f7;
}

.val-stock {
  color: #a855f7;
  font-weight: bold;
}

.dot-sector {
  background-color: var(--color-red, #b91c1c);
}

.val-sector {
  color: var(--color-red, #b91c1c);
  font-weight: bold;
}

.dot-country {
  background-color: var(--color-blue, #0891b2);
}

.val-country {
  color: var(--color-blue, #0891b2);
  font-weight: bold;
}

/* ============================================================================ */
/* CHART LAYOUTS & WRAPPERS */
/* ============================================================================ */

.mini-chart-container {
  width: 120px;
  min-height: 100px;
  aspect-ratio: 1;
  margin-top: 30px;
  margin-bottom: 9px;
  display: flex;
  align-items: center;
}

.radar-canvas {
  width: 100%;
  height: 100%;
}

.technical-summary,
.quantitative-summary {
  border: 3px solid var(--theme-color);
  background: var(--theme-color-a5) !important;
  text-align: left;
  margin-top: 1rem;
}

.technical-summary .details,
.quantitative-summary .details {
  margin-top: 14px;
  text-align: left;
}

.technical-summary .details p,
.quantitative-summary .details p {
  font-size: 14.5px;
  color: var(--theme-text-70-solid);
  font-weight: 600;
  line-height: 1.9rem;
}

.market-dynamics .line-chart {
  margin-top: 1.5rem;
  width: 100%;
  aspect-ratio: 1.5;
  min-height: 220px;
}

.market-dynamics .bar-chart {
  margin-top: 1.5rem;
  width: 100%;
  aspect-ratio: 2.2;
  min-height: 140px;
}

.market-dynamics .chart-footer span,
.market-dynamics .chart-footer strong {
  font-size: 9pt;
}

.multi-level-comparison .chart {
  width: 100%;
  aspect-ratio: 1;
  min-height: 110px;
}

.price-performance .chart {
  margin-top: 1.8rem;
  width: 100%;
  min-height: 200px;
  aspect-ratio: 2.1;
}

.Enhanced-Opportunity-Dashboard .card {
  background: none;
}

/* ============================================================================ */
/* PIOTROSKI F-SCORE CARDS */
/* ============================================================================ */

.piotroski-section .card.chart-container {
  text-align: center;
  background: var(--color-blue-10);
  border: 2px solid var(--color-blue);
}

.piotroski-section .card.chart-container .chart {
  min-width: 70%;
  min-height: 170px;
  max-height: 270px;
  align-items: center;
  margin: auto;
  aspect-ratio: 1;
}

.card.F-Score-card {
  --background: var(--theme-color-a5);
  --border: var(--theme-color);
  --color: var(--theme-color);
  background: var(--background);
  border: 2px solid var(--border);
}

.card.F-Score-card i,
.card.F-Score-card h2 {
  color: var(--color);
}

.card.F-Score-card.primary {
  --background: var(--color-blue-10);
  --border: var(--color-blue);
  --color: var(--color-blue);
}

.card.F-Score-card.warning {
  --background: var(--color-yellow-10);
  --border: var(--color-yellow);
  --color: var(--color-yellow);
}

.card.F-Score-card.success {
  --background: var(--color-green-10);
  --border: var(--color-green);
  --color: var(--color-green);
}

.card.F-Score-card.danger {
  --background: var(--color-red-10);
  --border: var(--color-red);
  --color: var(--color-red);
}

.card.F-Score-card-details {
  --background: var(--color-blue-10);
  --border: var(--color-blue);
  --color: var(--color-blue);
  background: var(--background);
  border: 2px solid var(--border);
}

/* ============================================================================ */
/* COMPONENT: TA-CARD */
/* ============================================================================ */

.ta-card {
  --ta-card-bg: var(--theme-bg-400);
  --ta-card-border: var(--theme-text-10);

  background: var(--ta-card-bg);
  border: 1px solid var(--ta-card-border);
  border-radius: 14px;
  padding: 20px;
}

.ta-card .row-item {
  margin-top: 30px;
}

.ta-card .info {
  text-align: center;
}

.ta-card .info-row {
  justify-content: center;
  position: relative;
  margin-top: 1rem;
}

.ta-card .info-row p {
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--theme-text-80);
  margin-bottom: 0;
  padding-inline: 1rem;
}

.ta-card .info .main-number {
  --color: var(--theme-color);
  font-size: 52px;
  color: var(--color);
  margin: 0;
  font-weight: 700;
}

.ta-card .info .primary {
  --color: var(--color-blue);
}

.ta-card .info .success {
  --color: var(--color-green);
}

.ta-card .info .warning {
  --color: var(--color-yellow);
}

.ta-card .info .danger {
  --color: var(--color-red);
}

.ta-card .info .description {
  font-size: 16px;
  color: var(--theme-text-100);
  margin-top: 5px;
}

/* Variants */
.ta-card.compact {
  padding: 12px;
}

.ta-card.outlined {
  background: transparent;
}

.ta-card.primary {
  --ta-card-border: var(--color-blue-30);
}

.ta-card.success {
  --ta-card-border: var(--color-green-30);
}

.ta-card.warning {
  --ta-card-border: var(--color-yellow-30);
}

.ta-card.danger {
  --ta-card-border: var(--color-red-30);
}

.card.chart-container .chart {
  min-width: 70%;
  min-height: 170px;
  max-height: 270px;
  align-items: center;
  margin: auto;
  aspect-ratio: 1;
}

.signals-container {
  display: flex;
  align-items: center;
}

.signals-container .header {
  font-weight: var(--fw-bold);
  text-transform: uppercase;
}

.signals-container .badge {
  min-width: 22px;
  height: 22px;
  font-size: 12px;
  padding: 12px;
}

.signal-box {
  border-radius: 8px;
  padding: 15px 15px;
  border: 1px solid;
  font-family: "Inter", sans-serif;
  transition: all 0.25s ease;
}

.signal-box {
  border: 2px solid;
}

/* HEADER */
.signal-box .header {
  display: flex;
  align-items: center;
  justify-content: left;
  gap: 10px;
  font-weight: 600;
  font-size: 12px;
  color: var(--theme-text-100);
}

/* ICON */
.signal-box .icon {
  font-size: 14px !important;
  display: flex;
  align-items: center;
  padding: 0 !important;
  justify-content: center;
}

/* INFO (ROA) */
.signal-box .info {
  margin-top: 4px;
  font-size: 10px;
  opacity: 0.8;
  --defined-color: var(--theme-text-100);
  letter-spacing: 0.5px;
}

/* VALUE ROW */
.signal-box .value-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--border-color-signal);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
}

/* NUMBER */
.signal-box .value-wrapper .number {
  font-size: 13px;
  font-weight: 700;
}

/* DESCRIPTION */
.signal-box .para-small {
  margin-top: 8px;
  font-size: 7.5pt;
  opacity: 0.85;
  line-height: 1.4;
  --defined-color: var(--theme-text-100);
}

/* ========================= */
/* ✅ CHECKED STATE */
/* ========================= */
.signal-box.checked {
  background: var(--color-green-10);
  border-color: var(--color-green);
  --border-color-signal: var(--color-green-60);
}

.signal-box.checked .icon {
  color: #22c55e;
}

.signal-box.checked:hover {
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.15);
}

/* ========================= */
/* ❌ UNCHECKED STATE */
/* ========================= */
.signal-box.unchecked {
  background: var(--color-red-10);
  border-color: var(--color-red);
  --border-color-signal: var(--color-red-60);
}

.signal-box.unchecked .icon {
  color: var(--color-red);
}

.signal-box.unchecked:hover {
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.15);
}

/* ============================================================================ */
/* COMPONENT: LIST */
/* ============================================================================ */

.list {
  min-height: 120px;
}

.list .badge {
  width: 100%;
}

/* center divider desktop */
@media (min-width: 768px) {
  .info-row::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 8px;
    transform: translateX(-50%);
    width: 1px;
    height: calc(100% - 16px);
    background: var(--theme-text-20);
  }
}

.list-item {
  border-radius: 22px;
  padding: 1.2rem;
  height: 100%;
  border: 2px solid var(--theme-text-10);
  text-align: center;
  background: var(--theme-bg-450);
  color: var(--color);
  transition: 0.25s ease;
}

.list-item.active {
  border: 2px solid var(--color-blue);
  box-shadow: 0 10px 30px var(--color-green-20);
}

.list-item .label {
  font-size: var(--fs-body-xs);
  font-weight: var(--fw-medium);
}

.list-item .value {
  font-size: var(--fs-body-md);
  color: var(--color);
  font-weight: var(--fw-bold);
}


.list-item .meta {
  border-top: 1px solid rgba(100, 100, 100, 0.12);
  margin-top: 1rem;
  padding-top: 1rem;
}

.list-item .meta-title {
  font-size: 0.95rem;
  margin-bottom: 0.45rem;
  color: var(--theme-text-80);
}

.bias {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.bias.positive {
  color: #16a34a;
}

.bias.negative {
  color: #dc2626;
}

/* ============================================================================ */
/* TECHNICAL ANALYSIS HEADER ELEMENTS */
/* ============================================================================ */

.technical-analysis .primary {
  --bg: var(--color-blue-20);
  --color: var(--color-blue);
}

.technical-analysis .success {
  --bg: var(--color-green-20);
  --color: var(--color-green);
}

.technical-analysis .warning {
  --bg: var(--color-yellow-20);
  --color: var(--color-yellow);
}

.technical-analysis .danger {
  --bg: var(--color-red-20);
  --color: var(--color-red);
}

.card .note {
  padding: 10px;
  border: 1px solid var(--theme-text-10);
  border-radius: 8px;
  font-size: var(--fs-body-xs);
}

.tech-score-card {
  width: 220px;
  padding: 20px 18px;
  border-radius: 14px;
  background: var(--theme-bg-400);
  border: 1px solid var(--theme-text-10);
  text-align: center;
  font-family: inherit;
}

.tech-score-title {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--theme-text-100);
  font-weight: 600;
  margin-bottom: 10px;
}

.tech-score-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  color: var(--theme-text-100);
  margin-bottom: 8px;
}

.tech-score-value .score {
  font-size: 34px;
  font-weight: 800;
  color: var(--color-green, #16a34a);
}

.tech-score-value .divider {
  font-size: 18px;
  color: var(--theme-text-70-solid);
}

.tech-score-value .max {
  font-size: 14px;
  color: var(--theme-text-70-solid);
}

.tech-score-label {
  font-size: 10px;
  color: var(--theme-text-100);
  font-weight: 500;
}

.RSI .chart {
  margin: auto;
  margin-top: 30px;
  width: 80%;
  min-width: 175px;
  max-width: 260px;
  aspect-ratio: 1.2;
}

.progress-item {
  margin-top: 27px;
}

.progress-item:last-child {
  margin-bottom: 0;
}

.item-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.item-value {
  font-weight: 700;
  color: var(--theme-text-100);
}

.item-bar-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* ============================================================================ */
/* COMPONENT: PROGRESS */
/* ============================================================================ */

.technical-analysis .progress {
  flex: 1;
  position: relative;
  align-items: center;
  gap: 12px;
  border-radius: 999px;
  margin-bottom: 0;
  height: 15px;
}

.technical-analysis .progress-track {
  flex: 1;
  height: 100%;
  background: var(--bg);
  border-radius: 999px;
  position: relative;
}

.technical-analysis .progress-fill {
  height: 100%;
  width: var(--value, 50%);
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0.253),
      transparent),
    var(--color);
  border-radius: inherit;
  transition: width 0.4s ease;
}

.progress-dot {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);

  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--color);
}

/* Header Alignment */
.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 41px;
}

.widget-title {
  color: var(--theme-text-100);
  font-size: 16px;
  font-weight: 600;
}

.widget-price {
  color: var(--color-cyan-dark);
  /* Bold Cyan color */
  font-size: 17px;
  font-weight: 700;
}


/* Progress Bar Flex Integration */
.bar-container {
  flex: 1 1 auto;
  /* Takes up all available empty space */
}

.bar-track {
  background-color: #f1f5f9;
  height: 14px;
  border-radius: 20px;
  position: relative;
  display: flex;
  align-items: center;
}

.bar-fill {
  height: 100%;
  border-radius: 20px;
  transition: width 0.5s ease;
  /* Smooth animation if data changes */
}

/* End-of-track Dots */
.track-dot {
  width: 6px;
  height: 6px;
  background-color: #ffffff;
  border-radius: 50%;
  position: absolute;
  right: 4px;
  border-style: solid;
  border-width: 2px;
}

/* SVG Checkmark Icon */
.check-icon {
  width: 16px;
  height: 16px;
  color: #10b981;
  /* Green checkmark */
  flex-shrink: 0;
}

/* ============================================================================ */
/* CUSTOM GAUGES (ADX, BOLLINGER, VOLATILITY) */
/* ============================================================================ */

.score-system {
  max-width: 420px;
  margin: auto;
  text-align: center;
}

.gauge-text {
  margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  background: var(--theme-bg-500);
}

.gauge-controls {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.gauge-controls label {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--theme-bg-500);
  cursor: pointer;
}

/* Semi-Circle Gauge (ADX) */
.ta-card.ADX .gauge-card {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #fff;
  border: 1px solid #d1d9ff;
  border-radius: 15px;
  padding: 14px 20px;
  max-width: 600px;
  margin: 20px auto;
  text-align: center;
}

.ta-card.ADX .gauge-container {
  position: relative;
  margin-bottom: 18px;
  container-type: inline-size;
  padding-top: 20px;
}

.ta-card.ADX .gauge-bar {
  display: flex;
  height: 45px;
  border-radius: 12px;
  width: 100%;
  container-type: inline-size;
  overflow: hidden;
}

.ta-card.ADX .segment {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.ta-card.ADX .weak {
  background-color: var(--color-red-20);
  color: var(--color-red);
}

.ta-card.ADX .moderate {
  background-color: var(--color-yellow-20);
  color: var(--color-yellow);
}

.ta-card.ADX .strong {
  background-color: var(--color-green-20);
  color: var(--color-green);
}

.ta-card.ADX .very-strong {
  background-color: var(--theme-color-a5);
  color: var(--theme-color);
}

.gauge-pointer-wrapper {
  position: absolute;
  top: 4px;
  left: var(--progress);
  transform: translateX(-50%);
  z-index: 10;
  transition: left 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pointer-diamond {
  width: 14px;
  height: 14px;
  background: var(--theme-color);
  transform: rotate(45deg);
  border: 2px solid white;
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(106, 61, 240, 0.35);
}

.pointer-line {
  width: 4px;
  height: 53px;
  background: var(--theme-color);
  margin: -6px auto 0;
  border-radius: 2px;
}

@container (max-width: 400px) {
  .ta-card.ADX .gauge-bar {
    height: 35px;
    border-radius: 10px;
  }

  .ta-card.ADX .segment {
    font-size: 11px;
    font-weight: 600;
  }

  .ta-card.ADX .gauge-pointer-wrapper {
    top: 4px;
  }

  .ta-card.ADX .pointer-line {
    height: 43px;
  }
}

@container (max-width: 300px) {
  .ta-card.ADX .gauge-bar {
    height: 30px;
    border-radius: 6.5px;
  }

  .ta-card.ADX .segment {
    font-size: 6px;
    font-weight: 700;
  }

  .ta-card.ADX .gauge-pointer-wrapper {
    top: 4px;
  }

  .ta-card.ADX .pointer-line {
    height: 38px;
  }
}

.bollinger-bands .gauge-section {
  position: relative;
  container-type: inline-size;
}

.bollinger-bands .gauge-track {
  width: 100%;
  height: 30px;
  border-radius: 6px;
  background: linear-gradient(to right, var(--color-red-30) 0%, var(--color-blue-30) 20%, var(--color-blue-30) 70%, var(--color-red-30) 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  border: 1px solid var(--theme-text-10);
  position: relative;
  overflow: hidden;
}

.bollinger-bands .segment-label {
  font-size: 11px;
  font-weight: 700;
  z-index: 2;
}

.bollinger-bands .segment-label.below,
.segment-label.above {
  color: var(--color-red-dark);
}

.bollinger-bands .segment-label.middle {
  color: var(--theme-text-100);
  margin-left: auto;
  margin-right: auto;
}

.bollinger-bands .marker-line {
  position: absolute;
  top: 0px;
  height: 61px;
  width: 2px;
  background-color: var(--theme-text-10);
  z-index: 1;
  pointer-events: none;
}

.left-cap {
  left: 0;
  border-radius: 6px 0 0 6px;
}

.middle-sma {
  left: 50%;
  transform: translateX(-50%);
}

.right-cap {
  right: 0;
  border-radius: 0 6px 6px 0;
}

.slider-pointer-wrapper {
  position: absolute;
  top: -18px;
  left: var(--slider-value);
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: left 0.4s ease-out;
}

.pointer-head {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--color-yellow);
  border: 2px solid var(--theme-bg-400);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pointer-stem {
  width: 4px;
  height: 35px;
  background-color: var(--color-yellow);
  margin-top: -3px;
  border-radius: 2px;
}

.value-box {
  background-color: var(--color-yellow);
  color: white;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  margin-top: 4.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.gauge-labels-row {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.band-label {
  font-size: 13px;
  color: var(--theme-text-100);
}

.band-label.middle-band {
  margin-left: auto;
  margin-right: auto;
}

@container (max-width: 250px) {
  .bollinger-bands .segment-label {
    font-size: 9.5px;
  }

  .bollinger-bands .value-box {
    margin-top: 5px;
    font-size: 8.5px;
    line-height: normal;
  }

  .bollinger-bands .band-label {
    font-size: 8px;
  }
}

.price-box {
  flex: 1;
  background-color: var(--color-yellow-20);
  border: 1px solid var(--color-yellow);
  border-radius: 10px;
  padding: 10px 15px;
  text-align: left;
}

.box-label {
  font-size: 9px;
  color: var(--theme-text-100);
  margin: 0 0 5px 0;
}

.box-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-yellow);
  margin: 0;
}

/* Volatility (ATR) Gauge */
.gauge-wrapper {
  position: relative;
  width: 95%;
  margin: 0 auto;
  padding-top: 10px;
}

.vol-track {
  height: 14px;
  width: 100%;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--color-green-60) 0%, var(--color-yellow-60) 50%, var(--color-red-60) 100%);
  border: 0.5px solid var(--theme-text-10);
}

.vol-pointer {
  position: absolute;
  top: 5px;
  left: var(--vol-position);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

.p-line-top,
.p-line-bottom {
  width: 3px;
  height: 8px;
  background-color: var(--color-yellow);
  border-radius: 2px;
}

.p-circle {
  width: 16px;
  height: 16px;
  background-color: var(--color-yellow);
  border: 2.5px solid var(--theme-text-contrast);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  margin: -3px 0;
}

.gauge-labels {
  display: flex;
  justify-content: space-between;
  width: 96%;
  margin: 10px auto 35px;
  font-size: 13px;
  font-weight: 500;
}

/* Base text elements for Gauges */
.main-number {
  font-size: 52px;
  margin: 0;
  font-weight: 700;
}

.description {
  font-size: 16px;
  color: var(--theme-text-100);
  margin-top: 5px;
}

.description strong {
  font-weight: 700;
}


@media (max-width: 768px) {
  .stock-header {
    padding: 0;
  }

  .stock-header .stock-profile {
    padding: 20px;
    border-radius: 16px;
    background-color: var(--theme-color);
    --sp-title-color: var(--theme-text-contrast);
    --sp-meta-color: var(--theme-text-contrast-90);
  }

  .stock-header .stock-profile .stock-meta {
    --defined-color: var(--theme-text-contrast-90);
  }
}

@media (max-width: 576px) {

  .ta-card.ATR .gauge-labels {
    font-size: 8.5px;
  }

  .stock-header .stock-profile {
    display: block;
    align-items: center;
    text-align: center;
  }

  .stock-header .stock-profile .stock-logo {
    margin: auto;
  }

  .stock-header .stock-profile div {
    margin-top: 20px;
  }

  .stock-header .stock-profile .stock-meta {
    margin-top: 5px;
  }

  .analysis-tabs {
    gap: 4px;
    justify-content: space-around;
  }

  .analysis-tabs .analysis-tab {
    font-size: 0.70rem;
    padding: 10px 9px;
  }

  .frist.technical-analysis .header {

    display: block;

  }

  .frist.technical-analysis .header .tech-score-card {
    margin-top: 1rem;
    width: 100%;
  }

  .ta-card.EMA .row-item {
    display: block;
  }

  .ta-card.EMA .row-item .row-info {
    margin: 10px auto;
  }

  .ta-card.EMA .row-item .info {
    margin-top: 8px;
  }

  .ta-card.EMA .row-item .info p {
    font-size: 9pt;
  }

  .ta-card.EMA .row-item .value-wrapper {
    margin-top: 10px;
    padding-top: 10px;
  }

  .ta-card.EMA .row-item .value-wrapper .number {
    font-size: 12px;
  }

}



.stock-analysis-skeleton-shell {
  padding: 24px 0 0;
  animation: stock-analysis-fade-in 0.2s ease;
}

.stock-analysis-skeleton-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.stock-analysis-skeleton-logo,
.stock-analysis-skeleton-card,
.stock-analysis-skeleton-line {
  background: linear-gradient(90deg, var(--theme-text-10, #eef2f7) 0%, var(--theme-bg-300, #f8fafc) 50%, var(--theme-text-10, #eef2f7) 100%);
  background-size: 200% 100%;
  animation: stock-analysis-shimmer 1.4s linear infinite;
}

.stock-analysis-skeleton-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  flex: 0 0 auto;
}

.stock-analysis-skeleton-line {
  height: 12px;
  border-radius: 999px;
  width: 220px;
  margin-bottom: 8px;
}

.stock-analysis-skeleton-line.short {
  width: 140px;
}

.stock-analysis-skeleton-card {
  border-radius: 16px;
  min-height: 180px;
  width: 100%;
  margin-bottom: 16px;
}

.stock-analysis-skeleton-card.large {
  min-height: 240px;
}

.stock-analysis-skeleton-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

@keyframes stock-analysis-shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

@keyframes stock-analysis-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ============================================================================ */
/* SNAPSHOT WIDGET & DATA RAIL */
/* ============================================================================ */

.snapshot-widget {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--theme-bg-400);
  padding: 16px 20px;
  border-radius: 8px;
  max-width: 100%;
  --defined-color: var(--theme-text-100);
  /* Default color for badges, can be overridden by specific classes */
}

.snapshot-title {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 12px;
  font-weight: 500;
}

/* Layout Blocks */
.marquee-viewport {
  overflow: hidden;
  width: 100%;
}

.marquee-track {
  display: flex;
  width: 100%;
}

.marquee-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.marquee-content.duplicate {
  display: none;
}

.data-row {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  white-space: nowrap;
}

.row-divider {
  border: none;
  border-top: 1px solid var(--theme-text-10);
  margin: 0;
  width: 100%;
}

/* Data Items & Text Colors */
.item {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  /* Slightly increased gap for FontAwesome icons */
}

.item svg {
  width: 19px;
  /* Fixed width for icons to ensure alignment */
  height: 19px;
}

.item strong {
  font-weight: 600;
}

.dot {
  color: var(--theme-text-10);
  /* Lighter gray to match image */
  font-size: 10px;
}

/* Specific text colors from image */
.text-blue {
  color: #2563eb !important;
}

.text-green {
  color: #059669 !important;
}

/* Icon Colors from image */
.icon-navy {
  color: #312e81;
  font-size: 13px;
}

.icon-green {
  color: #059669;
  font-size: 13px;
}

.icon-purple {
  color: #6d28d9;
  font-size: 13px;
}

/* Custom Badges (P/E, PEG, Beta) */
.badge {
  font-size: 9px;
  font-weight: 700;
  color: var(--theme-text-contrast);
  /* Purple text for badges */
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.icon-beta {
  font-family: serif;
  font-style: italic;
  font-weight: bold;
  font-size: 19px;
  line-height: 1;
}

/* =========================================
   Mobile View (Spinning Banner / Marquee)
   ========================================= */
@media (max-width: 1100px) {
  .marquee-track {
    width: max-content;
    animation: scroll-left 25s linear infinite;
  }

  .marquee-track:hover {
    animation-play-state: paused;
  }

  .marquee-content {
    width: auto;
    padding-right: 40px;
  }

  .marquee-content.duplicate {
    display: flex;
  }
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}


.openai-score-card {
  background: var(--color-green-10);
  /* Light green background */
  border: 1px solid var(--color-green);
  /* Soft green border */
  border-radius: 12px;
  padding: 8px 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 450px;
  /* Aap isko layout ke mutabik change kar sakte hain */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.openai-score-card .card-top {
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.openai-score-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: VAR(--theme-text-100);
}

.openai-score-card h3 span {
  font-size: 16px;
  color: VAR(--theme-text-100);
  font-weight: 500;
}

.openai-score-card .compare-link {
  font-size: 13px;
  color: #0891b2;
  /* Cyan/blue text link */
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.openai-score-card .compare-link:hover {
  text-decoration: underline;
}

.model-icons-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.model-icon {

  height: 18px;
  width: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
}

.model-icon img {
  width: 100%;
}

.icon-sep {
  color: #cbd5e1;
  font-size: 10px;
}

.model-multiplier {
  font-size: 14px;
  color: #475569;
  font-weight: 700;
}



/* ==========================================================================
   HYPER-MODERN PILL VARIANT (AI CONSENSUS)
   ========================================================================== */

.ai-consensus-banner.modern-pill-variant {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-2);
  padding: 12px 24px;
  background: var(--color-green-10);
  /* Soft green context layer[cite: 2, 5] */
  border: 1px solid rgba(22, 163, 74, 0.15);
  /* Crisper, native matched stroke borders[cite: 5] */
  border-radius: var(--radius-lg);
  /* Complete pill shape integration from image_4f4b24.png[cite: 5] */
  width: 100%;
  margin: var(--spacing-3) 0;
  box-shadow: var(--shadow-sm);
  /* Anti-clutter visual depth[cite: 5] */
}

/* Creative Icon Box Modification Added Natively */
.pill-icon-box {
  width: 36px;
  height: 36px;
  background: rgba(22, 163, 74, 0.14);
  /* Deep vibrant inner token tint[cite: 5] */
  color: var(--color-green);
  /* Sharp icon color pop[cite: 2, 5] */
  border-radius: var(--radius-md);
  /* Clean visual square-circle curvature[cite: 5] */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pill-icon-box i,
.pill-icon-box svg {
  width: 18px;
  height: 18px;
}

/* Left Section Balance */
.consensus-brand-area {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  flex-shrink: 0;
}

.consensus-title-text h3 {
  font-size: 14px;
  font-weight: var(--fw-bold);
  /* Bold hierarchy scale[cite: 5] */
  color: var(--theme-text-100);
  /* Dark/Light adaptation adaptive token[cite: 5] */
  margin: 0;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* Center Metric Track Matrix Layout */
.consensus-models-track {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  flex-grow: 1;
  justify-content: space-evenly;
  padding: 0 var(--spacing-3);
}

.model-metric-node {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity var(--transition-speed-fast) ease;
}

.model-metric-node:hover {
  opacity: 0.85;
  /* Subtle micro interaction feedback */
}

.model-node-logo {
  width: 26px;
  /* Optimized premium desktop layout sizing */
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

.consensus-check-wrapper {
  font-size: var(--fs-icon-md);
  /* Sharp check glyph[cite: 5] */
  color: var(--color-green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.model-node-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.model-node-name {
  font-size: 11px;
  font-weight: var(--fw-medium);
  /* Clean text classification scale[cite: 5] */
  color: var(--theme-text-40-solid);
  /* Highly readable metadata coloring[cite: 5] */
}

.model-node-score {
  font-size: var(--fs-body-sm);
  /* 14px metric value readability[cite: 5] */
  font-weight: var(--fw-bold);
  /* Bold value assertion[cite: 5] */
  color: var(--theme-text-100);
  /* Respects system themes[cite: 5] */
  margin-top: 2px;
}

.model-node-rank {
  font-weight: var(--fw-regular);
  /*[cite: 5] */
  color: var(--theme-text-40-solid);
  /*[cite: 5] */
  font-size: var(--fs-body-xs);
  /*[cite: 5] */
}

.consensus-track-divider {
  width: 1px;
  height: 24px;
  background: rgba(22, 163, 74, 0.15);
  /* Clean vertical divider line matching border rules[cite: 5] */
  flex-shrink: 0;
}

/* Right Controls/Badge Area */
.consensus-actions-area {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  flex-shrink: 0;
}

.agreement-pill-badge {
  background: rgba(22, 163, 74, 0.12);
  /* Clean green fill badge[cite: 2, 5] */
  color: var(--color-green-dark);
  /* Crisp typographic display contrast[cite: 2, 5] */
  font-size: var(--fs-body-xs);
  /*[cite: 5] */
  font-weight: var(--fw-bold);
  /*[cite: 5] */
  padding: 6px 14px;
  border-radius: var(--radius-full);
  /* Fully rounded badge tracking[cite: 5] */
  white-space: nowrap;
}

.consensus-redirect-btn {
  font-size: var(--fs-body-sm);
  /*[cite: 5] */
  font-weight: var(--fw-bold);
  /*[cite: 5] */
  color: var(--color-green);
  /* Theme green matching active tokens[cite: 2, 5] */
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-1);
  /*[cite: 5] */
  transition: transform var(--transition-speed-fast) ease, color var(--transition-speed-fast) ease;
  /*[cite: 5] */
  white-space: nowrap;
}

.consensus-redirect-btn i {
  transition: transform var(--transition-speed-fast) ease;
}

.consensus-redirect-btn:hover {
  color: var(--color-green-dark);
  /*[cite: 2, 5] */
}

.consensus-redirect-btn:hover i {
  transform: translateX(4px);
  /* Premium dashboard arrow slide transition effect */
}

/* ==========================================================================
   RESPONSIVE RENDERING PARAMETERS
   ========================================================================== */

@media (max-width: 1200px) {
  .ai-consensus-banner.modern-pill-variant {
    border-radius: var(--radius-lg);
    /* Fallback to smooth card corners on wrap breakpoint[cite: 5] */
    flex-direction: column;
    align-items: stretch;
    padding: var(--spacing-3);
  }

  .consensus-models-track {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: var(--spacing-3) var(--spacing-4);
    padding: var(--spacing-2) 0;
  }

  .consensus-track-divider {
    display: none;
    /* Destroys line dividers when cards group horizontally */
  }

  .consensus-actions-area {
    justify-content: space-between;
    margin-top: var(--spacing-1);
    border-top: 1px solid rgba(22, 163, 74, 0.12);
    padding-top: var(--spacing-2);
  }
}

@media (max-width: 600px) {
  .consensus-models-track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
    gap: var(--spacing-2);
  }

  .consensus-actions-area {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-2);
    text-align: center;
  }

  .consensus-redirect-btn {
    justify-content: center;
    background: var(--theme-bg-400);
    /* Adaptive card structure backdrop on mobile ports[cite: 2, 5] */
    border: 1px solid var(--theme-text-10);
    /*[cite: 5] */
    padding: 12px;
    border-radius: var(--radius-sm);
    /*[cite: 5] */
  }
}



/* ============================================================================ */
/* GLOBAL TOKENS & BRAND COLORS */
/* ============================================================================ */

/* Exact color scheme integration from your variables.css */
:root {
  /* Specific Brand Asset Colors */
  --brand-apple: #000000;
  --brand-nvidia: #76b900;
  --brand-microsoft: #f25f22;
  --brand-meta: #0064e0;
  --brand-google: #4285f4;
  --brand-netflix: #e50914;
  --brand-visa: #1a1f71;
  --brand-amd: #ed1c24;
}

.page-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero-panel {
  background: linear-gradient(135deg, transparent 0%, var(--theme-color-a6) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2rem;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.hero-panel__glow {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(32px);
}

.hero-panel__glow--one {
  right: -5rem;
  top: -5rem;
  width: 20rem;
  height: 20rem;
  background: var(--theme-color-a10);
}

.hero-panel__glow--two {
  left: 30%;
  bottom: 0;
  width: 15rem;
  height: 15rem;
  background: var(--theme-color-a5);
}

.hero-panel__content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.hero-panel__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--theme-color-a10);
  color: var(--theme-color);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
}

.hero-panel__title {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.5rem);
  line-height: 1;
  font-weight: 800;
  color: var(--text-main);
}

.hero-panel__desc {
  margin: 0;
  max-width: 36rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 36rem;
  background: var(--theme-bg-450);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 0.4rem;
  box-shadow: var(--shadow-sm);
}

.search-box:focus-within {
  border-color: var(--theme-color);
  box-shadow: 0 0 0 4px var(--theme-color-a10);
}

.search-box__field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
}

.search-box__field input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
}

.search-box__field input::placeholder {
  color: var(--theme-text-70-solid);
}

.search-box__button {
  background: var(--theme-color);
  color: #fff;
  border: 0;
  border-radius: 0.7rem;
  padding: 0.8rem 1.2rem;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-box__button:hover {
  background: var(--theme-color-dark);
}

.tag-row,
.feature-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.tag-row__label,
.feature-list__item {
  color: var(--theme-text-70-solid);
}

.tag-row__button,
.feature-pill {
  background: var(--theme-bg-400);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  background: transparent;
  border: 0;
  font-size: 0.78rem;
  font-weight: 600;
}

.feature-pill::before {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  background: var(--theme-color);
  border-radius: 50%;
  display: inline-block;
}

.card.sample-panel {
  background: var(--theme-bg-450);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.sample-panel__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.sample-panel__copy {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: var(--theme-text-70-solid);
}

.sample-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
}

.sample-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.sample-item:hover {
  background: var(--theme-color-a10);
}

.sample-item__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sample-item__logo {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.6rem;
  font-size: 0.78rem;
  font-weight: 900;
}

.sample-item__meta h4,
.sample-item__meta p {
  margin: 0;
}

.sample-item__meta h4 {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
}

.sample-item__meta p {
  font-size: 0.72rem;
  color: var(--theme-text-70-solid);
  font-weight: 500;
}

.sample-item__right {
  text-align: right;
}

.sample-item__badge {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
}

.sample-item__sub {
  display: block;
  font-size: 0.68rem;
  color: var(--theme-text-70-solid);
}

.section-block {
  display: flex;
  margin-top: 4rem;
  flex-direction: column;
  gap: 1rem;
}

.new-section-header {
  display: flex;
  align-items: end;
  width: 100%;
  justify-content: space-between;
  gap: 0.75rem;
}

.new-section-header__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.new-section-header__copy {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.section-link {
  color: var(--theme-color);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.stock-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.stock-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stock-grid--eight {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.interactive-card {
  background-color: var(--theme-bg-450);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.9rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.interactive-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(148, 163, 184, 0.5);
}

.stock-card__logo {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  margin: 0 auto;
  justify-content: center;
  border-radius: 0.6rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.stock-card__title,
.stock-card__subtitle {
  margin: 0;
}

.stock-card__title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
}

.stock-card__subtitle {
  font-size: 0.72rem;
  color: var(--theme-text-70-solid);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.data-card {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  cursor: pointer;
}

.data-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--theme-color-a10);
  color: var(--theme-color);
  border-radius: 0.8rem;
  flex: 0 0 auto;
}

.data-card__title,
.data-card__text,
.data-card__link {
  margin: 0;
}

.data-card__title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
}

.data-card__text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.data-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--theme-color);
  margin-top: 0.5rem;
}

.card.sector-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sector-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--theme-bg-450);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

.methodology-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--theme-color-950);
  color: #fff;
  border-radius: 0.9rem;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.methodology-banner__content {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.methodology-banner__icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.6rem;
  flex: 0 0 auto;
}

.methodology-banner__text {
  margin: 0;
  font-size: 0.82rem;
  color: #dbe3ff;
  line-height: 1.5;
}

.methodology-banner__text strong {
  color: #fff;
}

.methodology-banner__link {
  color: #fff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.footer-note {
  width: 100%;
  color: var(--theme-text-70-solid);
  font-size: 0.72rem;
  line-height: 1.6;
  border-top: 1px solid rgba(203, 208, 213, 0.8);
  padding-top: 1rem;
  font-weight: 500;
}

@media (max-width: 1024px) {
  .hero-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {

  .stock-grid,
  .data-grid,
  .stock-grid--four,
  .stock-grid--eight {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .methodology-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  /* ========== SCORE CARDS MOBILE RESPONSIVENESS ========== */
  
  /* Stack score cards vertically on tablet */
  .right-card-flex {
    width: 100%;
  }

  /* Score Display Card - Reduce size on mobile */
  .header .card-actions .score-display {
    padding: 10px;
    gap: 6px;
  }

  .header .card-actions .score-display p {
    font-size: 13px;
    margin-bottom: 4px;
  }

  .header .card-actions .score-display h4 {
    font-size: 1.15rem;
  }

  /* OpenAI Score Card - Responsive layout */
  .openai-score-card {
    max-width: 100%;
    padding: 6px 12px;
  }

  .openai-score-card h3 {
    font-size: 13px;
  }

  .openai-score-card h3 span {
    font-size: 14px;
  }

  .openai-score-card .compare-link {
    font-size: 11px;
  }

  /* Scenario rows - ensure proper wrapping */
  .scenario-row {
    padding: 12px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .scenario-left {
    gap: 6px;
    font-size: 13px;
  }

  .scenario-left i {
    font-size: 14px;
  }

  .scenario-center {
    flex: 1;
    min-width: 100%;
  }

  .progress-bar-container {
    height: 6px;
  }

  .scenario-right {
    width: 100%;
    text-align: right;
  }

  .scenario-right .price {
    font-size: 13px;
  }

  .scenario-right .change {
    font-size: 11px;
  }

  /* Model icons row - ensure wrapping */
  .model-icons-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .model-icon {
    width: 28px;
    height: 28px;
  }

  .icon-sep {
    font-size: 12px;
  }
}

@media (max-width: 640px) {


  .hero-panel,
  .sample-panel,
  .sector-pills,
  .methodology-banner {
    padding: 0.95rem;
  }

  .search-box {
    flex-direction: column;
  }

  .search-box__button {
    width: 100%;
  }

  .stock-grid,
  .data-grid,
  .stock-grid--four,
  .stock-grid--eight {
    grid-template-columns: 1fr;
  }

  /* ========== EXTRA SMALL SCREEN OPTIMIZATION ========== */
  
  /* Further reduce card padding for very small screens */
  .header .card-actions {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .header .card-actions .score-display {
    padding: 8px;
    width: 100%;
    box-sizing: border-box;
  }

  .header .card-actions .score-display p {
    font-size: 12px;
    margin-bottom: 3px;
  }

  .header .card-actions .score-display h4 {
    font-size: 1rem;
    word-break: break-word;
  }

  /* OpenAI Score Card - Stack vertically */
  .openai-score-card {
    padding: 6px 10px;
    width: 100%;
    box-sizing: border-box;
  }

  .openai-score-card .card-top {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .openai-score-card h3 {
    font-size: 12px;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .openai-score-card h3 span {
    font-size: 13px;
    display: block;
  }

  .openai-score-card .compare-link {
    font-size: 10px;
    align-self: flex-start;
  }

  .model-icons-row {
    justify-content: flex-start;
    gap: 6px;
  }

  .model-icon {
    width: 24px;
    height: 24px;
  }

  .icon-sep {
    font-size: 10px;
  }

  /* Scenario rows - extra compact */
  .scenario-row {
    padding: 10px;
    gap: 6px;
  }

  .scenario-left {
    gap: 4px;
    font-size: 12px;
  }

  .scenario-left i {
    font-size: 12px;
  }

  .scenario-center {
    flex: 1;
    min-width: 100%;
  }

  .progress-bar-container {
    height: 5px;
  }

  .scenario-right {
    width: 100%;
    text-align: right;
  }

  .scenario-right .price {
    font-size: 12px;
    font-weight: 600;
  }

  .scenario-right .change {
    font-size: 10px;
    display: block;
  }

  /* Ensure text wrapping for long content */
  .scenario-row,
  .scenario-left span.label,
  .scenario-right span.price {
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
}