/* ===================================================================
   StockPickers Landing Page - Dark Premium Theme
   =================================================================== */

/* === CSS Custom Properties === */
:root {
  /* Surfaces */
  --bg-primary:     #0f0f1a;
  --bg-secondary:   #141428;
  --bg-elevated:    #1a1a36;
  --bg-glass:       rgba(20, 20, 40, 0.6);

  /* Borders */
  --border-subtle:  rgba(255, 255, 255, 0.06);
  --border-medium:  rgba(255, 255, 255, 0.1);
  --border-strong:  rgba(255, 255, 255, 0.15);

  /* Text */
  --text-primary:   #f0f0f5;
  --text-secondary: #b0b0c0;
  --text-muted:     #7a7a90;

  /* Accents */
  --accent-cyan:    #00d9ff;
  --accent-green:   #00d26a;
  --accent-red:     #ff4757;
  --accent-yellow:  #ffa502;
  --accent-blue:    #3498db;

  /* Shadows */
  --shadow-sm:   0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md:   0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg:   0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(0, 217, 255, 0.08);

  /* Typography */
  --font-heading: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', 'Fira Code', 'Consolas', monospace;

  /* Fluid type scale (Major Third 1.25) */
  --text-xs:   clamp(0.64rem, 0.61rem + 0.15vw, 0.72rem);
  --text-sm:   clamp(0.8rem,  0.76rem + 0.2vw,  0.9rem);
  --text-base: clamp(1rem,    0.95rem + 0.25vw,  1.125rem);
  --text-md:   clamp(1.125rem, 1.05rem + 0.38vw, 1.35rem);
  --text-lg:   clamp(1.35rem, 1.2rem + 0.75vw,   1.75rem);
  --text-xl:   clamp(1.6rem,  1.35rem + 1.25vw,  2.25rem);
  --text-2xl:  clamp(2rem,    1.6rem + 2vw,      3rem);
  --text-3xl:  clamp(2.5rem,  1.8rem + 3.5vw,    4rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* === Navbar === */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 26, 0.85);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 var(--space-3);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-nav__logo {
  font-family: var(--font-heading);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--accent-cyan);
  text-decoration: none;
}

.landing-nav__links {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.landing-nav__link {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 12px 0;
}

.landing-nav__link:hover { color: var(--text-primary); }

.landing-nav__hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767px) {
  .landing-nav__links { display: none; }
  .landing-nav__links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: var(--space-4) var(--space-3);
    border-bottom: 1px solid var(--border-subtle);
    gap: var(--space-2);
  }
  .landing-nav__hamburger { display: flex; }
}

/* === Hero (compact variant) === */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8) var(--space-3);
  position: relative;
  overflow: hidden;
  min-height: 100svh;
}

.hero--compact {
  min-height: auto;
  padding: var(--space-6) var(--space-3) var(--space-4);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(0, 217, 255, 0.06), transparent 60%),
    radial-gradient(ellipse 40% 30% at 80% 80%, rgba(0, 210, 106, 0.04), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(255, 165, 2, 0.03), transparent 60%),
    var(--bg-primary);
  z-index: 0;
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  opacity: 0.4;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.hero--compact .hero__title {
  font-size: var(--text-2xl);
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-md);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
  letter-spacing: 0.02em;
}

.hero__ctas {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.hero__timestamp {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* === Status Pill (inline semaphore) === */
.hero__status-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 20px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.status-pill__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-pill__label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-xs);
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-pill--verde {
  background: rgba(0, 210, 106, 0.1);
  border: 1px solid rgba(0, 210, 106, 0.3);
  color: var(--accent-green);
}
.status-pill--verde .status-pill__dot {
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.status-pill--giallo {
  background: rgba(255, 165, 2, 0.1);
  border: 1px solid rgba(255, 165, 2, 0.3);
  color: var(--accent-yellow);
}
.status-pill--giallo .status-pill__dot {
  background: var(--accent-yellow);
  box-shadow: 0 0 8px var(--accent-yellow);
  animation: dot-pulse 2s ease-in-out infinite;
}

.status-pill--rosso {
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: var(--accent-red);
}
.status-pill--rosso .status-pill__dot {
  background: var(--accent-red);
  box-shadow: 0 0 8px var(--accent-red);
  animation: dot-pulse 1.5s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* === CTA Buttons === */
.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--bg-primary);
  background: linear-gradient(135deg, var(--accent-cyan), #0099cc);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 48px;
}

.cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 217, 255, 0.3);
}

.cta-primary:active {
  transform: translateY(0) scale(0.98);
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent-cyan);
  background: transparent;
  border: 1.5px solid rgba(0, 217, 255, 0.4);
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
  min-height: 48px;
}

.cta-secondary:hover {
  background: rgba(0, 217, 255, 0.08);
  border-color: rgba(0, 217, 255, 0.6);
}

.cta-tertiary {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--accent-cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.cta-tertiary:hover {
  border-bottom-color: var(--accent-cyan);
}

/* === Section Titles === */
.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: var(--space-8);
}

/* === Market Pulse === */
.market-pulse {
  padding: var(--space-16) var(--space-3);
}

.market-pulse--compact {
  padding: var(--space-12) var(--space-3);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.market-pulse--compact .pulse-card {
  padding: var(--space-4);
}

.market-pulse--compact .pulse-card__verdict {
  font-size: var(--text-lg);
}

.pulse-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 1023px) {
  .pulse-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 479px) {
  .pulse-grid { grid-template-columns: 1fr; }
}

.pulse-card {
  background: rgba(22, 33, 62, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  padding: var(--space-3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pulse-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.pulse-card--green { border-top: 2px solid var(--accent-green); }
.pulse-card--green .pulse-card__verdict { color: var(--accent-green); }

.pulse-card--yellow { border-top: 2px solid var(--accent-yellow); }
.pulse-card--yellow .pulse-card__verdict { color: var(--accent-yellow); }

.pulse-card--red { border-top: 2px solid var(--accent-red); }
.pulse-card--red .pulse-card__verdict { color: var(--accent-red); }

.pulse-card__icon {
  width: 32px;
  height: 32px;
  margin-bottom: var(--space-3);
  opacity: 0.7;
}

.pulse-card__icon svg {
  width: 100%;
  height: 100%;
}

.pulse-card__title {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.pulse-card__verdict {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.pulse-card__detail {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.5;
}

/* === Section Subtitle === */
.section-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
  margin-top: calc(var(--space-4) * -1);
  margin-bottom: var(--space-2);
}

/* === Top Opportunities === */
.opportunities {
  padding: var(--space-16) 0;
}

.opportunities--hero {
  padding-top: var(--space-4);
  padding-bottom: var(--space-12);
}

.opportunities__header {
  padding: 0 var(--space-3);
  max-width: 1200px;
  margin: 0 auto var(--space-8);
  text-align: center;
}

/* Grid layout for large cards */
.opps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* First two cards span wider on large screens */
.opps-grid > .opp-card:nth-child(-n+2) {
  grid-column: span 1;
}

/* Bottom row: last 2 cards centered */
.opps-grid > .opp-card:nth-child(4) {
  grid-column: 1 / 2;
  margin-left: auto;
}

@media (min-width: 1024px) {
  .opps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  /* First row: 3 cards. Second row: 2 cards centered */
  .opps-grid > .opp-card:nth-child(4) {
    grid-column: 1 / 2;
    margin-left: auto;
    width: 100%;
  }
  .opps-grid > .opp-card:nth-child(5) {
    grid-column: 3 / 4;
    margin-right: auto;
    width: 100%;
  }
}

@media (max-width: 1023px) {
  .opps-grid { grid-template-columns: repeat(2, 1fr); }
  .opps-grid > .opp-card:nth-child(5) { grid-column: 1 / -1; max-width: 400px; margin: 0 auto; }
}

@media (max-width: 599px) {
  .opps-grid { grid-template-columns: 1fr; }
  .opps-grid > .opp-card:nth-child(5) { max-width: none; }
}

/* Horizontal scroll fallback (still available) */
.opps-scroll {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: var(--space-2) var(--space-3);
  scrollbar-width: none;
  max-width: 1500px;
  margin: 0 auto;
}

.opps-scroll::-webkit-scrollbar { display: none; }

.opp-card {
  background: rgba(22, 33, 62, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  padding: var(--space-3);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.opp-card--large {
  display: flex;
  flex-direction: column;
}

.opp-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 217, 255, 0.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.opps-scroll > .opp-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
}

.opp-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
}

.opp-card__ticker {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.opp-card__rating {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

.opp-card__rating--strong-buy {
  background: rgba(0, 210, 106, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(0, 210, 106, 0.3);
}

.opp-card__rating--buy {
  background: rgba(0, 217, 255, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 217, 255, 0.2);
}

.opp-card__name {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.opp-card__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.opp-card__metric-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.opp-card__metric-value {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.opp-card__metric-value--green { color: var(--accent-green); }

.opp-card__reason {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-4);
  flex: 1;
}

.opp-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: var(--space-3);
}

.opp-card__algo {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.opp-card__algo strong {
  font-weight: 600;
}

.opp-card__algo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.opp-card__algo--bullish strong { color: var(--accent-green); }
.opp-card__algo--bullish .opp-card__algo-dot { background: var(--accent-green); }
.opp-card__algo--bearish strong { color: var(--accent-red); }
.opp-card__algo--bearish .opp-card__algo-dot { background: var(--accent-red); }
.opp-card__algo--neutral strong { color: var(--accent-yellow); }
.opp-card__algo--neutral .opp-card__algo-dot { background: var(--accent-yellow); }

.opp-card__earnings {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.opportunities__cta {
  text-align: center;
  padding: var(--space-8) var(--space-6) 0;
}

/* === How It Works === */
.how-it-works {
  padding: var(--space-16) var(--space-3);
  max-width: 1100px;
  margin: 0 auto;
}

.hiw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  margin-top: var(--space-8);
}

@media (max-width: 767px) {
  .hiw-grid { grid-template-columns: 1fr; gap: var(--space-4); }
}

.hiw-step { text-align: center; }

.hiw-step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.2);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-md);
  margin-bottom: var(--space-4);
}

.hiw-step__title {
  font-family: var(--font-heading);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.hiw-step__desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 300px;
  margin: 0 auto;
}

/* === Trust Strip === */
.trust-strip {
  padding: var(--space-12) var(--space-3);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.trust-strip__inner {
  display: flex;
  justify-content: center;
  gap: var(--space-12);
  max-width: 900px;
  margin: 0 auto;
}

.trust-stat { text-align: center; }

.trust-stat__number {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--accent-cyan);
}

.trust-stat__label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

@media (max-width: 767px) {
  .trust-strip__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
  }
}

/* === Footer === */
.footer-landing {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-12) var(--space-3);
}

.footer-landing__inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.footer-landing__links {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.footer-landing__links a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color 0.15s;
}

.footer-landing__links a:hover { color: var(--accent-cyan); }
.footer-landing__links a.footer-link--active { color: var(--accent-cyan); }

.footer-landing__legal-links {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.footer-landing__legal-links a {
  font-size: var(--text-xs);
  color: var(--text-muted);
  transition: color 0.15s;
}

.footer-landing__legal-links a:hover { color: var(--text-secondary); }
.footer-landing__legal-links a.footer-link--active { color: var(--accent-cyan); }

/* Donate link yellow */
.landing-nav__link--donate { color: #f59e0b !important; }
.landing-nav__link--donate:hover { color: #fbbf24 !important; }

.footer-landing__copy {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

.footer-landing__disclaimer {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto var(--space-4);
}

.footer-landing__credit {
  font-size: var(--text-xs);
  color: var(--text-muted);
  opacity: 0.6;
}

/* === Animations === */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 100ms; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 200ms; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 300ms; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .semaphore--giallo,
  .semaphore--verde,
  .semaphore--rosso {
    animation: none;
  }
  .pulse-card:hover,
  .opp-card:hover {
    transform: none;
    box-shadow: none;
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
  }
}

/* === Telegram CTA subtitle === */
.cta-telegram-note {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

/* === Active Navbar Link === */
.landing-nav__link--active {
  color: var(--accent-cyan);
}

/* === Doc / Legal Page Styles === */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.table-container {
  overflow-x: auto;
}

.legal-content {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-8) 0 0;
}
.legal-content h1 {
  color: var(--accent-cyan);
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  margin-bottom: var(--space-2);
}
.legal-content .last-update {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-8);
}
.legal-content h2 {
  color: var(--accent-cyan);
  font-family: var(--font-heading);
  font-size: var(--text-md);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}
.legal-content p,
.legal-content li {
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
  line-height: 1.7;
}
.legal-content ul {
  padding-left: 24px;
  margin-bottom: var(--space-3);
}

/* Doc table */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin: var(--space-4) 0 var(--space-6);
}
.doc-table th {
  background: var(--bg-elevated);
  color: var(--accent-cyan);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  white-space: nowrap;
}
.doc-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}
.doc-table tr:hover {
  background: rgba(0, 217, 255, 0.04);
}

/* Doc card */
.doc-card {
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-medium);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
}
.doc-card h3 {
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: var(--text-base);
  margin-bottom: var(--space-2);
}
.doc-card .subtitle {
  color: var(--accent-cyan);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: var(--space-2);
}

/* CTA nav pills */
.cta-nav-row {
  margin-bottom: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.cta-nav-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 217, 255, 0.08);
  border: 1px solid rgba(0, 217, 255, 0.25);
  border-radius: 100px;
  padding: 7px 16px;
  color: var(--accent-cyan);
  text-decoration: none;
  font-size: var(--text-xs);
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease;
}
.cta-nav-pill:hover {
  background: rgba(0, 217, 255, 0.15);
  transform: translateY(-1px);
}

/* Section nav (sticky pill bar) */
.section-nav {
  position: sticky;
  top: 60px;
  z-index: 50;
  background: rgba(15, 15, 26, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 20px;
  margin: 0 -20px var(--space-6);
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border-subtle);
}
.section-nav::-webkit-scrollbar { display: none; }
.section-nav__link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 100px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.section-nav__link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}
.section-nav__link.active {
  color: var(--accent-cyan);
  background: rgba(0, 217, 255, 0.1);
}

/* Scroll target offset for sticky nav */
[id].fs-section, h2[id], h3[id], div[id], [id].stock-card {
  scroll-margin-top: 120px;
}

/* Alpine.js cloak */
[x-cloak] { display: none !important; }

/* Glossary term tooltips */
.term {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--text-muted);
  text-underline-offset: 2px;
  cursor: help;
}
.term:hover, .term:focus {
  text-decoration-color: var(--accent-cyan);
  outline: none;
}
.term__tip {
  position: absolute;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 10px 12px;
  width: 280px;
  max-width: calc(100vw - 40px);
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--text-secondary);
  z-index: 9999;
  box-shadow: var(--shadow-md);
  pointer-events: none;
  font-weight: normal;
  text-decoration: none;
}

/* Disclaimer box */
.disclaimer-box {
  background: rgba(255, 165, 2, 0.08);
  border: 1px solid rgba(255, 165, 2, 0.25);
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: var(--space-8);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}
.disclaimer-box strong {
  color: var(--accent-yellow);
}

/* Data highlight badge (backtest tables) */
.data-highlight {
  display: inline-block;
  background: rgba(0, 217, 255, 0.08);
  border: 1px solid rgba(0, 217, 255, 0.2);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.82rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Numbered step lists */
.step-list {
  counter-reset: step-counter;
  list-style: none;
  padding-left: 0;
}
.step-list li {
  counter-increment: step-counter;
  padding-left: 32px;
  position: relative;
  margin-bottom: 12px;
}
.step-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  width: 22px;
  height: 22px;
  background: var(--bg-card);
  border-radius: 50%;
  text-align: center;
  line-height: 22px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

/* Variant labels (scenario coloring) */
.variant-label {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-right: 6px;
}
.variant-a { background: rgba(0, 210, 106, 0.15); color: var(--accent-green); }
.variant-b { background: rgba(0, 217, 255, 0.15); color: var(--accent-cyan); }
.variant-c { background: rgba(255, 165, 2, 0.15); color: var(--accent-yellow); }
.variant-d { background: rgba(255, 71, 87, 0.15); color: var(--accent-red); }

/* Table utility classes (legal pages) */
.doc-table .td-label { color: var(--text-primary); font-weight: 600; }
.doc-table .td-num   { color: var(--accent-cyan); font-weight: 700; }
.doc-table .td-accent { color: var(--accent-cyan); font-weight: 600; }
.text-red    { color: var(--accent-red); }
.text-green  { color: var(--accent-green); }
.text-yellow { color: var(--accent-yellow); }

/* Legal nav (old footer links — hidden when using landing footer) */
.legal-nav {
  margin-top: var(--space-8);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
  font-size: var(--text-sm);
}
.legal-nav a {
  color: var(--accent-cyan);
  text-decoration: none;
}
.legal-nav a:hover {
  text-decoration: underline;
}

@media (max-width: 767px) {
  .doc-table { font-size: var(--text-xs); }
  .doc-table th, .doc-table td { padding: 6px 8px; }
  .section-nav { margin: 0 -16px var(--space-4); padding: 8px 16px; }
}

/* === Landing Page: Hero compact === */
.hero--compact {
  padding: var(--space-6) var(--space-6) var(--space-4);
}
.hero--compact .hero__content {
  max-width: 1200px;
  width: 100%;
}
.hero--compact .hero__title {
  font-size: var(--text-2xl);
  white-space: nowrap;
}
.hero__controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  flex-wrap: wrap;
}

/* Landing: 6 card full 3x2 grid */
.opps-grid > .opp-card:nth-child(4) {
  grid-column: auto;
  margin-left: 0;
}
.opps-grid > .opp-card:nth-child(5) {
  grid-column: auto;
  margin-right: 0;
  max-width: none;
}
.opp-card__reason {
  font-size: var(--text-sm) !important;
  min-height: 4.5em;
  line-height: 1.55;
}

/* Landing: Support / donate strip */
.support-strip {
  padding: var(--space-8) var(--space-6);
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}
.support-strip__text {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.cta-donate {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 24px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: #1a1a2e;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 44px;
}
.cta-donate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}
.landing-nav__link--donate { color: #f59e0b !important; }
.landing-nav__link--donate:hover { color: #fbbf24 !important; }

@media (max-width: 767px) {
  .hero--compact .hero__title {
    white-space: normal;
    font-size: var(--text-xl);
  }
}

/* ============================================
   Swing Trade Plan — card component
   ============================================ */
.swing-trade-plan {
  margin-top: 12px;
  padding: 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.swing-trade-plan__header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}
.swing-trade-plan__title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.swing-trade-plan__badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 217, 255, 0.1);
  color: var(--accent-cyan);
  letter-spacing: 0.03em;
}

/* --- Levels grid --- */
.swing-levels-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (min-width: 480px) {
  .swing-levels-grid {
    grid-template-columns: 1.3fr 1fr 1fr 0.8fr;
    gap: 12px;
  }
}
.swing-level {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  transition: background 0.2s ease;
}
.swing-level:hover { background: rgba(255, 255, 255, 0.05); }
.swing-level--entry {
  background: rgba(0, 217, 255, 0.06);
  border-color: rgba(0, 217, 255, 0.15);
}
.swing-level__label {
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  line-height: 1;
}
.swing-level__value {
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.swing-level--entry .swing-level__value { color: var(--accent-cyan); font-size: 1.15rem; }
.swing-level--target .swing-level__value { color: rgba(0, 210, 106, 0.85); }
.swing-level--stop .swing-level__value { color: rgba(255, 71, 87, 0.85); }
.swing-level--hold .swing-level__value { color: var(--text-primary); }

/* --- Risk/Reward bar --- */
.swing-rr {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}
.swing-rr__bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  display: flex;
}
.swing-rr__risk { height: 100%; background: rgba(255, 71, 87, 0.5); border-radius: 2px 0 0 2px; }
.swing-rr__reward { height: 100%; background: rgba(0, 210, 106, 0.5); border-radius: 0 2px 2px 0; }
.swing-rr__label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* --- Context note (aside) --- */
.swing-context {
  margin-top: 12px;
  padding: 10px 14px;
  border-left: 3px solid var(--border-medium);
  border-radius: 0 8px 8px 0;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-secondary);
}
.swing-context--recovery { border-left-color: rgba(0, 210, 106, 0.5); }
.swing-context--caution { border-left-color: rgba(255, 165, 2, 0.5); }

/* --- Recovery Scenarios (backtested) --- */
.swing-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}
.swing-entry__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.swing-entry__value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.swing-scenarios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.swing-scenario {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}
.swing-scenario--primary {
  border-color: rgba(0, 210, 106, 0.3);
  background: rgba(0, 210, 106, 0.04);
}
.swing-scenario--secondary {
  opacity: 0.85;
}

.swing-scenario__name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.swing-scenario__tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  margin-bottom: 8px;
}
.swing-scenario__tag--recommended {
  background: rgba(0, 210, 106, 0.12);
  color: rgba(0, 210, 106, 0.9);
}

.swing-scenario__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2px 0;
}
.swing-scenario__metric-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.swing-scenario__metric-value {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.swing-scenario__metric-value--target {
  color: rgba(0, 210, 106, 0.9);
  font-size: 0.85rem;
}
.swing-scenario__metric-value--return {
  color: rgba(0, 210, 106, 0.85);
}

.swing-nostop {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(255, 165, 2, 0.06);
  border: 1px solid rgba(255, 165, 2, 0.15);
}
.swing-nostop__icon {
  font-size: 0.75rem;
  font-weight: 800;
  color: rgba(255, 165, 2, 0.8);
  flex-shrink: 0;
  margin-top: 1px;
}
.swing-nostop__text {
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

@media (max-width: 480px) {
  .swing-scenarios {
    grid-template-columns: 1fr;
  }
}

/* ===================================================================
   STRATEGY PAGES (Phase A — Apr 2026)
   pe_switch.html + buy_the_dip.html + shared macros
   =================================================================== */

/* === Main wrapper === */
.strategy-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-3) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

/* === Timing Strip (sticky 4-pill sotto la navbar) === */
.timing-strip {
  position: sticky;
  top: 60px; /* height of navbar */
  z-index: 90;
  background: rgba(15, 15, 26, 0.9);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.timing-pill {
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s, color 0.15s;
  white-space: nowrap;
  min-height: 38px;
}

.timing-pill:hover {
  color: var(--text-primary);
  transform: translateY(-1px);
}

.timing-pill__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-muted);
}

.timing-pill__label {
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
}

.timing-pill__value {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}

.timing-pill--green { border-color: rgba(0, 210, 106, 0.3); }
.timing-pill--green .timing-pill__dot { background: var(--accent-green); box-shadow: 0 0 8px rgba(0, 210, 106, 0.5); }
.timing-pill--green .timing-pill__value { color: var(--accent-green); }

.timing-pill--yellow { border-color: rgba(255, 165, 2, 0.3); }
.timing-pill--yellow .timing-pill__dot { background: var(--accent-yellow); box-shadow: 0 0 8px rgba(255, 165, 2, 0.5); }
.timing-pill--yellow .timing-pill__value { color: var(--accent-yellow); }

.timing-pill--red { border-color: rgba(255, 71, 87, 0.35); }
.timing-pill--red .timing-pill__dot { background: var(--accent-red); box-shadow: 0 0 8px rgba(255, 71, 87, 0.5); }
.timing-pill--red .timing-pill__value { color: var(--accent-red); }

/* === Strategy Card (espandibile) === */
.strategy-card {
  background: linear-gradient(180deg, var(--bg-secondary), var(--bg-elevated));
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
}

.strategy-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.strategy-card__title-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.strategy-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
}

.strategy-card__badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.strategy-card__badge--active {
  background: rgba(0, 210, 106, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(0, 210, 106, 0.3);
}

.strategy-card__badge--signal {
  background: rgba(0, 217, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 217, 255, 0.3);
}

.strategy-card__badge--standby {
  background: rgba(176, 176, 192, 0.12);
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
}

.strategy-card__guide-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-cyan);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: opacity 0.15s;
}

.strategy-card__guide-link:hover { opacity: 0.8; }

.strategy-card__teaser {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 var(--space-3) 0;
  max-width: 900px;
}

.strategy-card__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.strategy-card__toggle:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.strategy-card__details {
  list-style: none;
  margin: var(--space-3) 0 0 0;
  padding: var(--space-3) var(--space-4);
  background: rgba(0, 0, 0, 0.2);
  border-left: 2px solid var(--accent-cyan);
  border-radius: 6px;
}

.strategy-card__details li {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  padding: 3px 0;
}

.strategy-card__details li::before {
  content: '› ';
  color: var(--accent-cyan);
  font-weight: 600;
}

/* === Branch Indicator === */
.branch-indicator {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  padding: var(--space-5, 1.25rem) var(--space-6);
}

.branch-indicator__branches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.branch-indicator__branch {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.15s;
}

.branch-indicator__branch--active {
  border-color: rgba(0, 217, 255, 0.4);
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.08), var(--bg-primary));
  box-shadow: 0 0 24px rgba(0, 217, 255, 0.08);
}

.branch-indicator__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.branch-indicator__branch--active .branch-indicator__dot {
  background: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 217, 255, 0.6);
}

.branch-indicator__label {
  font-family: var(--font-heading);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.branch-indicator__status {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: auto;
}

.branch-indicator__branch--active .branch-indicator__status {
  color: var(--accent-cyan);
}

.branch-indicator__meter-label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.branch-indicator__meter-label strong {
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-size: var(--text-md);
}

.branch-indicator__sep { color: var(--text-muted); }

.branch-indicator__bar {
  position: relative;
  height: 8px;
  background: var(--bg-primary);
  border-radius: 999px;
  overflow: hidden;
}

.branch-indicator__bar-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-yellow) 70%, var(--accent-red));
  border-radius: 999px;
  transition: width 0.4s ease-out;
}

.branch-indicator__bar-threshold {
  position: absolute;
  top: -3px; bottom: -3px;
  left: calc(70% - 1px);
  width: 2px;
  background: var(--text-primary);
  opacity: 0.6;
}

.branch-indicator__hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: var(--space-2) 0 0 0;
}

.branch-indicator__hint strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* === Picks Section (Growth / Value) === */
.picks-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.picks-section__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.picks-section__title {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.picks-section__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.picks-section__dot--active {
  background: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 217, 255, 0.6);
}

.picks-section__status {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
}

.picks-section__sub {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
}

.picks-section__grid {
  display: grid;
  gap: var(--space-4);
}

.picks-section__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.picks-section__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.picks-section__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.picks-section__empty {
  padding: var(--space-6);
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px dashed var(--border-medium);
  border-radius: 10px;
  font-size: var(--text-sm);
}

@media (max-width: 900px) {
  .picks-section__grid--3,
  .picks-section__grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

/* === Pick-rich card extensions (rank + variant accent) === */
/* Base styles provided by templates/partials/_stock_card_styles.html (included via extra_styles).
   Here we only add the pick rank badge and the variant left-border accent. */
.stock-card--growth { border-left: 3px solid var(--accent-cyan); }
.stock-card--value  { border-left: 3px solid var(--accent-green); }
.stock-card--neutral { border-left: 3px solid var(--text-muted); }

.sp-rank {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 2px 8px;
  background: var(--bg-elevated);
  border-radius: 4px;
  margin-right: 6px;
}

.sp-reason {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 12px 0;
  padding: 10px 14px;
  background: rgba(0, 217, 255, 0.04);
  border-left: 2px solid var(--accent-cyan);
  border-radius: 4px;
}

.sp-reason strong { color: var(--text-primary); }

.sp-bear-case {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 8px 0 12px 0;
  padding: 8px 12px;
  background: rgba(255, 71, 87, 0.05);
  border-left: 2px solid rgba(255, 71, 87, 0.4);
  border-radius: 4px;
  line-height: 1.5;
}

.sp-bear-case strong { color: var(--accent-red); }

.stock-card--placeholder {
  background: var(--bg-secondary);
  border: 1px dashed var(--border-medium);
  border-radius: 12px;
  padding: var(--space-6);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 180px;
}

.stock-card__placeholder-text {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.stock-card__placeholder-text code {
  font-family: var(--font-mono);
  background: var(--bg-elevated);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.72rem;
}

/* === Value Lock Overlay === */
.picks-section--value .value-container {
  position: relative;
}

.value-container__cards--ghosted > * {
  opacity: 0.25;
  filter: blur(1px) grayscale(0.5);
  pointer-events: none;
  user-select: none;
  transition: opacity 0.35s, filter 0.35s;
}

.value-container__cards {
  transition: opacity 0.35s, filter 0.35s;
}

.value-lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(15, 15, 26, 0.5), rgba(26, 26, 54, 0.4));
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 10px;
  z-index: 5;
}

.value-lock__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  background: rgba(15, 15, 26, 0.7);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  cursor: pointer;
  color: var(--accent-cyan);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  max-width: 420px;
  text-align: center;
}

.value-lock__btn:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(0, 217, 255, 0.15);
}

.value-lock__icon {
  color: var(--accent-cyan);
  transition: transform 0.25s;
}

.value-lock__icon--open { display: none; }
.value-lock__btn:hover .value-lock__icon--closed { display: none; }
.value-lock__btn:hover .value-lock__icon--open  { display: block; }

.value-lock__text {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  margin-top: var(--space-2);
}

.value-lock__sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 320px;
}

.value-lock__relock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--space-2);
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  align-self: flex-end;
}

.value-lock__relock:hover { color: var(--text-primary); border-color: var(--accent-cyan); }

/* === Wyckoff badges (phase pills) === */
.wyckoff-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
}

.wyckoff-badge--accumulation { background: rgba(0, 210, 106, 0.15); color: var(--accent-green); border-color: rgba(0, 210, 106, 0.3); }
.wyckoff-badge--markup       { background: rgba(0, 217, 255, 0.15); color: var(--accent-cyan);  border-color: rgba(0, 217, 255, 0.3); }
.wyckoff-badge--distribution { background: rgba(255, 165, 2, 0.15); color: var(--accent-yellow); border-color: rgba(255, 165, 2, 0.3); }
.wyckoff-badge--markdown     { background: rgba(255, 71, 87, 0.15); color: var(--accent-red);   border-color: rgba(255, 71, 87, 0.3); }
.wyckoff-badge--ranging,
.wyckoff-badge--unknown      { background: var(--bg-elevated); color: var(--text-muted); }

/* === Wyckoff Row (filtered candidates display) === */
.wyckoff-row__title {
  font-family: var(--font-heading);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.wyckoff-row__sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0 0 var(--space-3) 0;
}

.wyckoff-row__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.wyckoff-row__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: var(--text-sm);
  text-transform: none;
  letter-spacing: 0;
}

.wyckoff-row__ticker {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}

.wyckoff-row__phase {
  font-size: var(--text-xs);
  opacity: 0.85;
}

/* === Forward P/E Ranking Table === */
.pe-ranking__title {
  font-family: var(--font-heading);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.pe-ranking__sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0 0 var(--space-3) 0;
}

.pe-ranking__wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1px solid var(--border-medium);
}

.pe-ranking__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.pe-ranking__table thead {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-medium);
}

.pe-ranking__table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.pe-ranking__th-num { text-align: right; }

.pe-ranking__table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.pe-ranking__table tbody tr:last-child td { border-bottom: none; }
.pe-ranking__table tbody tr:hover { background: rgba(0, 217, 255, 0.04); }

.pe-ranking__rank {
  font-family: var(--font-mono);
  color: var(--text-muted);
  width: 2em;
}

.pe-ranking__ticker {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}

.pe-ranking__name { color: var(--text-secondary); }

.pe-ranking__num {
  font-family: var(--font-mono);
  text-align: right;
  color: var(--text-primary);
}

/* === Pick Diff === */
.pick-diff__title {
  font-family: var(--font-heading);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-3) 0;
}

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

.pick-diff__col {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  padding: var(--space-4);
}

.pick-diff__col h3 {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 var(--space-3) 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pick-diff__count {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-xs);
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg-elevated);
}

.pick-diff__col--added   h3 { color: var(--accent-green); }
.pick-diff__col--added   .pick-diff__count { background: rgba(0, 210, 106, 0.15); color: var(--accent-green); }
.pick-diff__col--dropped h3 { color: var(--accent-red); }
.pick-diff__col--dropped .pick-diff__count { background: rgba(255, 71, 87, 0.15); color: var(--accent-red); }

.pick-diff__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pick-diff__pill {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.pick-diff__pill--added    { background: rgba(0, 210, 106, 0.15); color: var(--accent-green); }
.pick-diff__pill--dropped  { background: rgba(255, 71, 87, 0.15); color: var(--accent-red); }
.pick-diff__pill--unchanged { background: var(--bg-elevated); color: var(--text-secondary); }

.pick-diff__empty,
.pick-diff__fallback {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-style: italic;
}

.pick-diff__fallback {
  padding: var(--space-4);
  background: var(--bg-secondary);
  border: 1px dashed var(--border-medium);
  border-radius: 10px;
  text-align: center;
}

@media (max-width: 700px) {
  .pick-diff__grid { grid-template-columns: 1fr; }
}

/* === Dip Card (buy_the_dip) === */
.dip-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-left: 3px solid var(--accent-red);
  border-radius: 10px;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.dip-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dip-card__ticker {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--text-primary);
}

.dip-card__drop {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-md);
  color: var(--accent-red);
  padding: 4px 10px;
  background: rgba(255, 71, 87, 0.12);
  border-radius: 6px;
}

.dip-card__name {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: 0;
}

.dip-card__price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-family: var(--font-mono);
}

.dip-card__price {
  font-weight: 700;
  font-size: var(--text-md);
  color: var(--text-primary);
}

.dip-card__prev {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-decoration: line-through;
}

.dip-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.dip-card__foot {
  font-size: var(--text-xs);
  color: var(--text-muted);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-subtle);
}

/* === Quality E1 badge === */
.quality-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: var(--text-xs);
  font-weight: 600;
  border: 1px solid transparent;
}

.quality-badge--ok   { background: rgba(0, 210, 106, 0.15); color: var(--accent-green); border-color: rgba(0, 210, 106, 0.3); }
.quality-badge--warn { background: rgba(255, 165, 2, 0.15); color: var(--accent-yellow); border-color: rgba(255, 165, 2, 0.3); }

.quality-badge__icon {
  font-weight: 800;
}

.quality-badge__detail {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  opacity: 0.85;
  margin-left: 4px;
  padding-left: 6px;
  border-left: 1px solid currentColor;
}

/* === Mega Cap Trace === */
.mega-trace__title {
  font-family: var(--font-heading);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.mega-trace__sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0 0 var(--space-3) 0;
}

.mega-trace__strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--space-2);
}

.mega-trace__tile {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  padding: var(--space-2) var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.mega-trace__ticker {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.mega-trace__bar {
  width: 100%;
  height: 4px;
  background: var(--bg-primary);
  border-radius: 999px;
  overflow: hidden;
}

.mega-trace__bar-fill {
  height: 100%;
  background: var(--text-muted);
  transition: width 0.35s;
}

.mega-trace__pct {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
}

.mega-trace__tile--green { border-color: rgba(0, 210, 106, 0.3); }
.mega-trace__tile--green .mega-trace__bar-fill { background: var(--accent-green); }
.mega-trace__tile--green .mega-trace__pct { color: var(--accent-green); }

.mega-trace__tile--yellow { border-color: rgba(255, 165, 2, 0.3); }
.mega-trace__tile--yellow .mega-trace__bar-fill { background: var(--accent-yellow); }
.mega-trace__tile--yellow .mega-trace__pct { color: var(--accent-yellow); }

.mega-trace__tile--red { border-color: rgba(255, 71, 87, 0.35); }
.mega-trace__tile--red .mega-trace__bar-fill { background: var(--accent-red); }
.mega-trace__tile--red .mega-trace__pct { color: var(--accent-red); }

@media (max-width: 800px) {
  .mega-trace__strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 500px) {
  .mega-trace__strip {
    grid-auto-flow: column;
    grid-auto-columns: 32%;
    grid-template-columns: unset;
    overflow-x: auto;
    padding-bottom: var(--space-2);
  }
}

/* === Fallen Angels Table === */
.fallen-angels__title {
  font-family: var(--font-heading);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.fallen-angels__sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0 0 var(--space-3) 0;
}

.fallen-angels__wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1px solid var(--border-medium);
}

.fallen-angels__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.fallen-angels__table thead {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-medium);
}

.fallen-angels__table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.fallen-angels__th-num { text-align: right; }

.fallen-angels__table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.fallen-angels__table tbody tr:last-child td { border-bottom: none; }
.fallen-angels__table tbody tr:hover { background: rgba(0, 217, 255, 0.04); }

.fallen-angels__ticker {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}

.fallen-angels__name { color: var(--text-secondary); }

.fallen-angels__num {
  font-family: var(--font-mono);
  text-align: right;
  color: var(--text-primary);
}

.fallen-angels__num--green  { color: var(--accent-green); }
.fallen-angels__num--yellow { color: var(--accent-yellow); }
.fallen-angels__num--red    { color: var(--accent-red); }

/* === Action Pills (Accumula / Monitora) === */
.action-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.action-pill--buy {
  background: rgba(0, 210, 106, 0.15);
  color: var(--accent-green);
  border-color: rgba(0, 210, 106, 0.3);
}

.action-pill--watch {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border-color: var(--border-medium);
}

/* === Retrace Card === */
.retrace-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.retrace-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.retrace-card__ticker {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}

.retrace-card__drop {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--accent-yellow);
  padding: 2px 6px;
  background: rgba(255, 165, 2, 0.1);
  border-radius: 4px;
}

.retrace-card__name {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0;
  line-height: 1.3;
}

.retrace-card__metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  font-size: var(--text-xs);
}

.retrace-card__metrics > div {
  display: flex;
  flex-direction: column;
}

.retrace-card__metrics span {
  color: var(--text-muted);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.retrace-card__metrics strong {
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.retrace-card__upside { color: var(--accent-green) !important; }

/* === Mobile adjustments === */
@media (max-width: 600px) {
  .strategy-page { padding: var(--space-4) var(--space-3); gap: var(--space-6); }
  .strategy-card { padding: var(--space-4); }
  .strategy-card__title { font-size: var(--text-lg); }
  .branch-indicator__branches { grid-template-columns: 1fr; }
  .timing-strip { padding: var(--space-2); gap: 6px; }
  .timing-pill { padding: 6px 10px; font-size: 0.66rem; }
}
