/* ILLOGICO — motore topologico SOM/ACM */

/* Hero ILLOGICO — sotto header + ticker */
.illogico-hero {
  position: relative;
  z-index: 2;
  margin-top: var(--nav-offset);
  padding: clamp(3.5rem, 8vw, 5.5rem) 0 clamp(3.75rem, 7vw, 5rem);
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 100% 90% at 50% -20%, rgba(93, 191, 160, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 80% 60%, rgba(107, 159, 212, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 15% 70%, rgba(255, 193, 7, 0.08), transparent 45%),
    linear-gradient(180deg, rgba(24, 32, 42, 0.85) 0%, rgba(40, 52, 66, 0.4) 100%);
  border-bottom: 1px solid rgba(120, 150, 180, 0.25);
  scroll-margin-top: var(--nav-offset);
}
.illogico-hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 50% 40% at 50% 30%, rgba(93, 191, 160, 0.15), transparent 70%);
}
.illogico-hero-inner {
  position: relative;
  max-width: 54rem;
  margin: 0 auto;
}
.illogico-hero-title {
  font-family: var(--font);
  font-size: clamp(3.5rem, 12vw, 6.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 1.15rem;
  background: linear-gradient(135deg, #f2f6fa 0%, #5dbfa0 45%, #d4ae72 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 4px 24px rgba(93, 191, 160, 0.25));
}
.illogico-hero-subtitle {
  font-size: clamp(1.25rem, 3.2vw, 1.85rem);
  font-weight: 600;
  color: var(--heading);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
}
.illogico-hero-tagline {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  font-weight: 400;
  color: #b8c5d4;
  line-height: 1.65;
  max-width: 42rem;
  margin: 0 auto 1.75rem;
}
.illogico-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 1.35rem;
  border-radius: 10px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--heading);
  background: var(--emerald-soft);
  border: 1px solid rgba(93, 191, 160, 0.4);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.illogico-hero-cta:hover {
  background: rgba(93, 191, 160, 0.28);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(93, 191, 160, 0.2);
}

.illogico-section {
  font-size: var(--text-base);
  background:
    radial-gradient(ellipse 85% 60% at 50% 20%, rgba(93, 191, 160, 0.11), transparent),
    radial-gradient(ellipse 70% 50% at 50% 50%, rgba(107, 159, 212, 0.08), transparent),
    linear-gradient(180deg, transparent, rgba(107, 159, 212, 0.04));
  border-bottom: 1px solid var(--border);
  padding-top: 3.5rem;
  padding-bottom: 8rem;
}

.illogico-container {
  width: min(1440px, calc(100% - 3rem));
}

.illogico-head .kicker { color: var(--emerald); }

/* ── Titolo principale ── */
.illogico-title-block {
  margin-bottom: 3.5rem;
  text-align: center;
  scroll-margin-top: var(--nav-offset);
}
.illogico-main-title {
  font-family: var(--font);
  font-size: clamp(2.1rem, 5.8vw, 3.5rem);
  font-weight: 700;
  color: var(--heading);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}
.illogico-tagline {
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  font-weight: 400;
  color: #b8c5d4;
  max-width: 44rem;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Come funziona ── */
.illogico-how {
  margin-bottom: 3.5rem;
  margin-top: 1rem;
  scroll-margin-top: calc(var(--nav-offset) + 1rem);
}
.illogico-how-title {
  font-family: var(--font);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--heading);
  text-align: center;
  margin-bottom: 1.25rem;
}
.illogico-how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.illogico-how-card {
  padding: 1.15rem 1.1rem;
  border-radius: var(--radius);
  background: var(--surface2);
  border: 1px solid var(--border);
}
.illogico-how-card .how-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--emerald-soft);
  color: var(--emerald);
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: 0.65rem;
}
.illogico-how-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 0.45rem;
}
.illogico-how-card p {
  font-size: var(--text-sm);
  color: #b8c5d4;
  line-height: 1.6;
}

/* ── Backtest hero ── */
.illogico-backtest-hero {
  margin-bottom: 3.5rem;
  padding: 1.75rem 2rem;
  border-radius: var(--radius);
  border: 2px solid rgba(93, 191, 160, 0.45) !important;
  background: linear-gradient(135deg, rgba(93, 191, 160, 0.12), rgba(107, 159, 212, 0.08)) !important;
  scroll-margin-top: calc(var(--nav-offset) + 3.5rem);
}
.illogico-backtest-hero.card-3d::before { border-radius: var(--radius); }
.backtest-hero-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.backtest-hero-head h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--heading);
}
.backtest-hero-badge {
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--emerald-soft);
  color: var(--emerald);
  border: 1px solid rgba(93, 191, 160, 0.35);
}
.backtest-hero-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}
.backtest-hero-kpi {
  text-align: center;
  padding: 1rem 0.75rem;
  border-radius: 12px;
  background: rgba(40, 52, 66, 0.65);
  border: 1px solid var(--border);
}
.backtest-hero-kpi b {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--emerald);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}
.backtest-hero-kpi--gold b { color: var(--gold); }
.backtest-hero-kpi span {
  font-size: var(--text-sm);
  color: #b8c5d4;
  line-height: 1.4;
}
.backtest-hero-foot {
  margin-top: 0.85rem;
  font-size: var(--text-sm);
  color: #b8c5d4;
}
.backtest-hero-foot a {
  color: var(--emerald);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Legenda SOM — rail orizzontale integrata ── */
@keyframes som-rail-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
.som-legend-rail {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.28rem 0.38rem;
  margin: 0 1.1rem -0.45rem;
  padding: 0.28rem 0.65rem 0.32rem;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, rgba(14, 20, 32, 0.94), rgba(10, 15, 24, 0.98));
  border: 1px solid rgba(70, 95, 125, 0.38);
  border-top: 1px solid rgba(93, 191, 160, 0.14);
  box-shadow:
    0 6px 14px rgba(6, 10, 18, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
  z-index: 2;
}
.som-legend-rail::-webkit-scrollbar { display: none; }
.som-rail-item {
  flex: 0 0 auto;
  scroll-snap-align: center;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-family: var(--font);
  font-size: 0.52rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #8fa3b8;
  white-space: nowrap;
  opacity: 0;
  cursor: default;
  animation: som-rail-in 0.45s ease forwards;
  animation-delay: calc(var(--i, 0) * 45ms + 80ms);
  transition: color 0.2s ease;
}
.som-rail-item:hover { color: #d0dce8; }
.som-rail-item i,
.som-rail-item .lg-price {
  transition: transform 0.25s ease, filter 0.25s ease;
}
.som-rail-item:hover i,
.som-rail-item:hover .lg-price {
  transform: scale(1.15);
  filter: brightness(1.12);
}
.som-rail-vrule {
  flex: 0 0 1px;
  align-self: stretch;
  width: 1px;
  min-height: 12px;
  margin: 0 0.08rem;
  background: linear-gradient(180deg, transparent, rgba(70, 95, 125, 0.55), transparent);
  opacity: 0;
  animation: som-rail-in 0.35s ease forwards;
  animation-delay: calc(var(--i, 6) * 45ms + 120ms);
}
.som-legend-rail .lg-dot {
  width: 7px;
  height: 7px;
  margin: 0;
  border-width: 1px;
  box-shadow: none;
}
.som-legend-rail .lg-dot.lg-gold { box-shadow: 0 0 4px rgba(255, 193, 7, 0.45); }
.som-legend-rail .lg-dot.lg-silver { box-shadow: 0 0 4px rgba(0, 229, 255, 0.4); }
.som-legend-rail .lg-dot.lg-up { box-shadow: 0 0 4px rgba(0, 230, 118, 0.4); }
.som-legend-rail .lg-dot.lg-dn { box-shadow: 0 0 4px rgba(255, 23, 68, 0.4); }
.som-legend-rail .lg-ring {
  width: 8px;
  height: 8px;
  margin: 0;
  border-width: 2px;
  box-shadow: none;
}
.som-legend-rail .lg-line {
  width: 14px;
  height: 2px;
  margin: 0;
  animation: lg-march 2.4s linear infinite;
}
.som-legend-rail .lg-line-proj-up,
.som-legend-rail .lg-line-proj-dn {
  animation-duration: 2.8s;
}
.som-rail-price .lg-price {
  min-width: auto;
  width: 0.85rem;
  height: 0.85rem;
  margin: 0;
  padding: 0;
  border-radius: 3px;
  font-size: 0.48rem;
  line-height: 1;
}

/* ── Prima schermata: SOM centrale + Radar + Segnali ── */
.illogico-focus-stage {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  margin-bottom: 5.5rem;
  scroll-margin-top: calc(var(--nav-offset) + 1rem);
}

.som-stage {
  width: 100%;
  max-width: 100%;
  margin: 0 auto 2rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.focus-panel-title {
  font-family: var(--font);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 0.85rem;
}

.focus-som .focus-panel-title {
  text-align: center;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.som-map-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  width: 100%;
  text-align: center;
}
.som-map-header .focus-panel-title {
  width: 100%;
  text-align: center;
  margin-bottom: 0;
  line-height: 1.25;
  position: relative;
  z-index: 2;
}
.som-map-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
}
.som-scan-btn[aria-expanded="true"] {
  color: #7ec8ff;
  border-color: rgba(107, 159, 212, 0.6);
  background: rgba(107, 159, 212, 0.14);
}
.som-scan-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0 auto 0.65rem;
  padding: 0.35rem 0.75rem;
  max-width: 52rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: #9eb0c4;
  text-align: center;
  line-height: 1.4;
}
.som-scan-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(144, 164, 174, 0.5);
  flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}
.som-scan-status.is-live .som-scan-status-dot {
  background: var(--emerald);
  box-shadow: 0 0 8px rgba(93, 191, 160, 0.65);
  animation: som-scan-pulse 2s ease-in-out infinite;
}
.som-scan-status.is-scanning .som-scan-status-dot {
  background: #ffc107;
  box-shadow: 0 0 8px rgba(255, 193, 7, 0.55);
  animation: som-scan-pulse 0.8s ease-in-out infinite;
}
@keyframes som-scan-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.som-scan-info {
  width: 100%;
  max-width: 56rem;
  margin: 0 auto 0.85rem;
  padding: 1rem 1.2rem 1.15rem;
  border-radius: 12px;
  background: rgba(22, 32, 48, 0.72);
  border: 1px solid rgba(107, 159, 212, 0.32);
  box-shadow: 0 10px 32px rgba(8, 12, 20, 0.28);
}
.som-scan-info[hidden] { display: none !important; }
.som-scan-info-head { text-align: center; margin-bottom: 0.85rem; }
.som-scan-info-head h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.25rem;
}
.som-scan-info-sub {
  font-size: 0.78rem;
  color: #9eb0c4;
  margin: 0;
}
.som-scan-live {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.som-scan-kpi {
  text-align: center;
  padding: 0.55rem 0.4rem;
  border-radius: 8px;
  background: rgba(12, 18, 28, 0.55);
  border: 1px solid rgba(107, 159, 212, 0.2);
}
.som-scan-kpi b {
  display: block;
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--emerald);
  margin-bottom: 0.15rem;
}
.som-scan-kpi span {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8fa3b8;
}
.som-scan-block {
  margin-bottom: 0.85rem;
}
.som-scan-block h4 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #7ec8ff;
  margin-bottom: 0.45rem;
}
.som-scan-block-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
}
.som-scan-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  color: #b8c5d4;
  line-height: 1.5;
}
.som-scan-list li { margin-bottom: 0.3rem; }
.som-scan-list-warn { color: #c9a8a8; }
.som-scan-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.som-scan-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.8rem;
  color: #b8c5d4;
  line-height: 1.45;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: rgba(12, 18, 28, 0.4);
  border: 1px solid rgba(70, 95, 125, 0.22);
}
.som-step-n {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(107, 159, 212, 0.22);
  color: #a8d4ff;
  font: 700 0.65rem var(--mono);
}
.som-scan-foot {
  margin: 0.5rem 0 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: #7a8fa3;
}
.som-scan-foot code {
  color: #9ecae8;
  background: rgba(12, 18, 28, 0.5);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.som-guide-btn {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #c5d3e2;
  background: rgba(28, 38, 52, 0.75);
  border: 1px solid rgba(107, 159, 212, 0.35);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}
.som-guide-btn:hover {
  color: var(--heading);
  border-color: rgba(93, 191, 160, 0.5);
  background: rgba(32, 44, 58, 0.9);
}
.som-guide-btn[aria-expanded="true"] {
  color: var(--emerald);
  border-color: rgba(93, 191, 160, 0.55);
  background: rgba(93, 191, 160, 0.12);
}
.som-map-guide[hidden] {
  display: none !important;
}

.som-map-hint {
  text-align: center;
  font-size: 0.78rem;
  color: #a8b8c8;
  margin: 0 auto 0.85rem;
  max-width: 52rem;
  line-height: 1.45;
  padding: 0.4rem 0.75rem;
  background: transparent;
  border: none;
}
.som-hint-short { display: none; }

.som-viz-stack {
  width: 100%;
  max-width: 100%;
  margin: 0 auto 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.som-map-guide {
  width: 100%;
  max-width: 56rem;
  margin: 1.1rem auto 0.85rem;
  padding: 1.1rem 1.25rem 1.25rem;
  border-radius: 12px;
  background: rgba(32, 44, 58, 0.52);
  border: 1px solid rgba(107, 159, 212, 0.28);
  box-shadow: 0 8px 28px rgba(8, 12, 20, 0.25);
}
.som-guide-head {
  margin-bottom: 0.75rem;
  text-align: center;
}
.som-map-guide-title {
  font-family: var(--font);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--heading);
  margin: 0;
}
.som-map-guide-sub {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
  color: var(--emerald);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.som-guide-lead {
  font-size: 0.82rem;
  line-height: 1.55;
  color: #c5d3e2;
  margin: 0 0 0.85rem;
  text-align: center;
}
.som-guide-notice {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(93, 191, 160, 0.08);
  border: 1px solid rgba(93, 191, 160, 0.28);
  font-size: 0.74rem;
  line-height: 1.5;
  color: #b8c8d8;
}
.som-guide-notice strong { color: var(--emerald); }
.som-guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.som-guide-block {
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
  background: rgba(18, 26, 38, 0.45);
  border: 1px solid rgba(107, 159, 212, 0.12);
}
.som-guide-block-wide {
  grid-column: 1 / -1;
}
.som-guide-block h4 {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--emerald);
}
.som-guide-block p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.5;
  color: #b0bec8;
}
.som-map-guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.som-map-guide-list li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.76rem;
  line-height: 1.45;
  color: #b0bec8;
}
.som-map-guide-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: rgba(93, 191, 160, 0.7);
  font-weight: 700;
}
.som-guide-colors {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.som-guide-colors li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.74rem;
  color: #b0bec8;
}
.som-guide-examples-title {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
}
.som-example-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}
.som-example-card {
  position: relative;
  padding: 0.75rem 0.85rem 0.75rem 2.4rem;
  border-radius: 8px;
  background: rgba(18, 26, 38, 0.5);
  border: 1px solid rgba(107, 159, 212, 0.14);
}
.som-example-card h5 {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--heading);
}
.som-example-card p {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #a8b8c8;
}
.som-example-read {
  font-size: 0.7rem !important;
  color: #8ec4b0 !important;
  margin-bottom: 0 !important;
}
.som-example-num {
  position: absolute;
  left: 0.65rem;
  top: 0.7rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(93, 191, 160, 0.2);
  color: var(--emerald);
}
.som-example-up { border-left: 3px solid rgba(255, 193, 7, 0.55); }
.som-example-warn { border-left: 3px solid rgba(255, 145, 0, 0.55); }
.som-example-calm { border-left: 3px solid rgba(144, 164, 174, 0.55); }

@media (max-width: 768px) {
  .som-guide-grid,
  .som-example-grid {
    grid-template-columns: 1fr;
  }
  .som-guide-block-wide { grid-column: auto; }

  .som-hint-full { display: none; }
  .som-hint-short { display: inline; }
  .som-scan-live { grid-template-columns: repeat(2, 1fr); }
  .som-scan-block-grid { grid-template-columns: 1fr; }
  .som-scan-status { font-size: 0.62rem; padding: 0.3rem 0.5rem; }
  .som-map-hint {
    font-size: 0.72rem;
    margin-bottom: 0.55rem;
    padding: 0.3rem 0.5rem;
  }

  .som-legend-rail {
    margin: 0 0.45rem -0.35rem;
    padding: 0.24rem 0.5rem 0.28rem;
    gap: 0.22rem 0.3rem;
    justify-content: flex-start;
  }
  .som-rail-item { font-size: 0.48rem; gap: 0.22rem; }

  .som-traj-toggle {
    top: 8px;
    right: 8px;
    padding: 0.35rem 0.5rem;
    font-size: 0.6rem;
  }
  .som-traj-toggle-label { display: none; }

  .som-traj-caption {
    font-size: 0.54rem;
    line-height: 1.4;
    padding: 0.35rem 0.5rem;
  }
  .som-traj-caption .cap-note { display: none; }
  .som-traj-caption .cap-price {
    font-size: 0.52rem;
    padding: 0.08rem 0.3rem;
  }

  .illogico-core-label {
    bottom: 2.6rem;
    font-size: 0.55rem;
  }
  .illogico-stats-hero {
    bottom: 6px;
    left: 6px;
    right: 6px;
    gap: 0.2rem;
  }
  .illogico-stats-hero .illogico-stat {
    padding: 0.15rem 0.28rem;
  }
  .illogico-stats-hero .illogico-stat span {
    font-size: 0.46rem;
  }
  .illogico-stats-hero .illogico-stat b {
    font-size: 0.62rem;
  }
  .som-traj-caption {
    margin-bottom: 0.4rem;
  }
}

.som-traj-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: #b8c5d4;
  cursor: pointer;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  background: rgba(12, 18, 28, 0.82);
  border: 1px solid rgba(107, 159, 212, 0.38);
  backdrop-filter: blur(6px);
  user-select: none;
  transition: border-color 0.2s, background 0.2s;
}
.som-traj-toggle:hover {
  border-color: rgba(93, 191, 160, 0.5);
  background: rgba(15, 24, 36, 0.9);
}
.som-traj-toggle input {
  accent-color: var(--emerald);
  width: 14px;
  height: 14px;
  cursor: pointer;
}
.som-traj-toggle-label { white-space: nowrap; }

/* ── Overlay caricamento mappa SOM ── */
.som-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(12, 18, 28, 0.82);
  backdrop-filter: blur(10px);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.som-loading-overlay:not([hidden]) { display: flex; pointer-events: auto; }
.som-loading-overlay.is-visible { opacity: 1; }
.som-load-stage {
  text-align: center;
  max-width: 22rem;
  animation: somLoadFloat 3s ease-in-out infinite;
}
@keyframes somLoadFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.som-load-orbit {
  position: relative;
  width: 9.5rem;
  height: 9.5rem;
  margin: 0 auto 1.1rem;
}
.som-load-grid {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: repeat(3, 0.55rem);
  gap: 0.28rem;
}
.som-load-grid span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  background: rgba(93, 191, 160, 0.25);
  animation: somGridPulse 1.4s ease-in-out infinite;
}
.som-load-grid span:nth-child(odd) { animation-delay: 0.15s; }
.som-load-grid span:nth-child(3n) { animation-delay: 0.3s; }
.som-load-grid-core {
  background: rgba(212, 174, 114, 0.85) !important;
  box-shadow: 0 0 12px rgba(212, 174, 114, 0.55);
  animation: somGridCore 1s ease-in-out infinite !important;
}
@keyframes somGridPulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}
@keyframes somGridCore {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.35); }
}
.som-load-sat {
  position: absolute;
  left: 50%;
  top: 50%;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.2rem 0.38rem;
  border-radius: 999px;
  color: var(--gold);
  background: rgba(212, 174, 114, 0.15);
  border: 1px solid rgba(212, 174, 114, 0.4);
  white-space: nowrap;
  transform-origin: 0 0;
  animation: somSatOrbit 4s linear infinite;
}
.som-load-sat.s1 { animation-duration: 3.2s; color: #7ec8ff; border-color: rgba(107, 159, 212, 0.45); background: rgba(107, 159, 212, 0.12); }
.som-load-sat.s2 { animation-duration: 4.1s; animation-delay: -0.8s; }
.som-load-sat.s3 { animation-duration: 3.6s; animation-delay: -1.4s; color: var(--emerald); border-color: rgba(93, 191, 160, 0.45); background: rgba(93, 191, 160, 0.1); }
.som-load-sat.s4 { animation-duration: 4.8s; animation-delay: -2s; }
.som-load-sat.s5 { animation-duration: 3.9s; animation-delay: -2.6s; color: #c9a8ff; border-color: rgba(180, 140, 255, 0.4); background: rgba(180, 140, 255, 0.1); }
@keyframes somSatOrbit {
  from { transform: rotate(0deg) translateX(4.2rem) rotate(0deg); }
  to { transform: rotate(360deg) translateX(4.2rem) rotate(-360deg); }
}
.som-load-title {
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--heading);
  margin: 0 0 0.35rem;
}
.som-load-msg {
  font-size: 0.78rem;
  color: #9eb0c4;
  line-height: 1.45;
  margin: 0 0 0.85rem;
  min-height: 2.2em;
}
.som-load-progress-wrap {
  height: 6px;
  border-radius: 999px;
  background: rgba(40, 52, 66, 0.8);
  border: 1px solid rgba(107, 159, 212, 0.25);
  overflow: hidden;
  margin-bottom: 0.55rem;
}
.som-load-progress {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--emerald), #7ec8ff, var(--gold));
  background-size: 200% 100%;
  animation: somLoadBarShine 1.8s linear infinite;
  transition: width 0.45s ease;
}
@keyframes somLoadBarShine {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.som-load-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: #7a92a8;
  margin: 0 0 0.45rem;
}
.som-load-tip {
  font-size: 0.66rem;
  color: #6d8094;
  margin: 0;
  line-height: 1.4;
}

.illogico-viz-hero {
  min-height: min(82vh, 960px) !important;
  max-height: none !important;
  position: relative;
  border: 2px solid rgba(107, 159, 212, 0.5) !important;
  border-bottom: 1px solid rgba(70, 95, 125, 0.35) !important;
  box-shadow:
    0 28px 96px rgba(10, 18, 30, 0.58),
    0 0 0 1px rgba(93, 191, 160, 0.15);
  border-radius: calc(var(--radius) + 6px) calc(var(--radius) + 6px) 0 0;
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
}
.illogico-viz-hero.card-3d::before {
  border-radius: calc(var(--radius) + 6px) calc(var(--radius) + 6px) 0 0;
}
.illogico-stats-hero {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  gap: 0.28rem;
}
.illogico-stats-hero .illogico-stat {
  padding: 0.2rem 0.38rem;
  border-radius: 6px;
}
.illogico-stats-hero .illogico-stat b {
  font-size: 0.72rem;
  line-height: 1.15;
}
.illogico-stats-hero .illogico-stat span {
  font-size: 0.52rem;
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.focus-split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.75rem;
  align-items: stretch;
  min-height: 340px;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}
.focus-radar,
.focus-signals {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.illogico-radar-focus {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 0 !important;
  padding: 1rem 1.1rem !important;
  min-height: 280px;
  border-color: rgba(212, 174, 114, 0.35) !important;
}
.illogico-radar-focus .radar-title { font-size: 1rem; }
.illogico-radar-focus .radar-grid {
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.illogico-radar-focus .radar-col { min-height: 100px; padding: 0.65rem; }
.illogico-radar-focus .radar-rows { max-height: 200px; overflow-y: auto; }

.signals-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  align-items: center;
}
.illogico-filters-compact { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.sector-filters-compact { display: flex; flex-wrap: wrap; gap: 0.3rem; }

.illogico-signals-focus {
  flex: 1;
  min-height: 240px;
  max-height: 340px;
  overflow-y: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface2);
  padding: 0.35rem;
}

.illogico-below-fold {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}
.illogico-below-fold > .illogico-drawer { margin-top: 1.5rem; }

/* ── Workspace: gruppi e drawer collassabili ── */
.workspace-group {
  margin-bottom: 1.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.workspace-group:last-child { border-bottom: none; }
.workspace-group-head {
  margin-bottom: 0.65rem;
}
.workspace-group-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--emerald);
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}
.workspace-group-desc {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 0.45rem;
}
.workspace-group .suite-filter-bar { margin-top: 0.35rem; }
#preferiti .suite-filter-bar {
  margin-top: 0.25rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: var(--surface-inset);
  border: 1px solid var(--border);
}
.workspace-group .suite-scan-status { margin: 0.25rem 0 0; }
.workspace-group .spec-day-section { margin-bottom: 0.65rem; }

/* Hub personale + dettaglio titolo — affiancati su desktop, impilati su mobile */
.workspace-duo {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  align-items: start;
}
.workspace-duo .workspace-group {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
@media (min-width: 1080px) {
  .workspace-duo {
    grid-template-columns: minmax(280px, 0.92fr) minmax(340px, 1.08fr);
    gap: 1rem;
  }
}

.workspace-drawer { margin-bottom: 0.55rem; }
.workspace-drawer-stage {
  margin-top: 1rem;
  border: 1px solid rgba(93, 191, 160, 0.22);
}
.workspace-drawer-body-flush { padding-top: 0.85rem; }
.illogico-drawer-body-flush .illogico-tracci,
.illogico-drawer-body-flush .illogico-esame,
.illogico-drawer-body-flush .illogico-verify,
.illogico-drawer-body-flush .learn-box {
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}
.illogico-how-nested {
  margin: 0 0 1rem !important;
  padding: 0;
}
.illogico-how-nested .illogico-how-title { margin-top: 0; }
.illogico-edu-nested {
  margin-top: 0.75rem;
  margin-bottom: 0;
}
.illogico-detail-wrap { margin-bottom: 0; }
.workspace-group .spec-day-section {
  margin-bottom: 0.65rem;
}

.illogico-edu {
  margin-bottom: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(40, 52, 66, 0.35);
}
.illogico-edu summary {
  list-style: none;
  cursor: pointer;
}
.illogico-edu summary::-webkit-details-marker { display: none; }
.illogico-edu .drawer-sum { border-radius: 10px; margin: 0; }
.illogico-edu .edu-body { padding: 0 1rem 1rem; }
.edu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.edu-card {
  padding: 0.85rem;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.edu-card h3 {
  font-family: var(--display);
  font-size: 0.88rem;
  color: var(--heading);
  margin-bottom: 0.45rem;
}
.edu-card h3 em { color: var(--gold); font-style: normal; }
.edu-card p,
.edu-card li {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.5;
}
.edu-legend,
.edu-trust {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0;
}
.edu-legend li,
.edu-trust li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}
.edu-legend .lg-dot { margin-top: 3px; }
.guida-legend-inline {
  margin-top: 0.65rem;
  font-size: var(--text-sm);
}
.guida-legend-inline li { margin-bottom: 0.4rem; }
.edu-trust strong { color: var(--emerald); }
.edu-note {
  font-size: 0.68rem !important;
  margin-top: 0.45rem !important;
  font-style: italic;
}
.illogico-detail-wrap { margin-bottom: 1.25rem; }
.illogico-detail-wrap .illogico-detail { padding: 1rem 1.15rem; }

.illogico-drawer {
  margin-bottom: 0.65rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass-bg-soft);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  transition: box-shadow 0.3s, border-color 0.3s, background 0.35s ease;
}
.illogico-drawer[open] {
  border-color: color-mix(in srgb, var(--ds-a, var(--emerald)) 32%, var(--glass-border));
  box-shadow: var(--glass-shadow), 0 0 24px color-mix(in srgb, var(--ds-a, var(--emerald)) 12%, transparent);
}
.illogico-drawer summary {
  list-style: none;
  cursor: pointer;
}
.illogico-drawer summary::-webkit-details-marker { display: none; }

/* Barra apri/chiudi drawer — colori e animazioni per tipologia */
.drawer-sum {
  --ds-a: #5dbfa0;
  --ds-glow: rgba(93, 191, 160, 0.3);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 1rem 0.7rem 0.75rem;
  font-family: var(--mono);
  background: linear-gradient(90deg, color-mix(in srgb, var(--ds-a) 10%, transparent), var(--glass-bg-strong));
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-left: 4px solid var(--ds-a);
  position: relative;
  overflow: hidden;
  transition: background 0.3s, padding 0.25s;
  user-select: none;
}
.drawer-sum::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, color-mix(in srgb, var(--ds-a) 14%, transparent) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
  pointer-events: none;
}
.drawer-sum:hover {
  background: linear-gradient(90deg, color-mix(in srgb, var(--ds-a) 20%, transparent), rgba(20, 28, 38, 0.55));
}
.drawer-sum:hover::after { transform: translateX(120%); }
details[open] > .drawer-sum {
  background: linear-gradient(90deg, color-mix(in srgb, var(--ds-a) 24%, transparent), rgba(20, 28, 38, 0.65));
  border-bottom: 1px solid color-mix(in srgb, var(--ds-a) 22%, var(--border));
}
.drawer-sum-sm { padding: 0.55rem 0.85rem 0.55rem 0.65rem; }

.dsum-chev {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ds-a) 18%, var(--surface-inset));
  border: 1px solid color-mix(in srgb, var(--ds-a) 35%, transparent);
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), background 0.25s;
}
.dsum-chev::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--ds-a);
  margin-left: 2px;
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}
details[open] > .drawer-sum .dsum-chev {
  background: color-mix(in srgb, var(--ds-a) 30%, var(--surface-inset));
  box-shadow: 0 0 10px var(--ds-glow);
}
details[open] > .drawer-sum .dsum-chev::before {
  transform: rotate(90deg);
}

.dsum-icon {
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  line-height: 1;
  border-radius: 12px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--ds-a) 30%, var(--surface-inset)), var(--surface-inset));
  border: 1px solid color-mix(in srgb, var(--ds-a) 40%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--ds-glow) 50%, transparent);
  position: relative;
  overflow: hidden;
}
.dsum-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  flex: 1;
}
.dsum-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: 0.02em;
  transition: color 0.25s;
}
details[open] > .drawer-sum .dsum-title { color: var(--ds-a); }
.dsum-hint {
  font-size: 0.6rem;
  color: var(--muted);
  line-height: 1.3;
  transition: color 0.25s;
}
details[open] > .drawer-sum .dsum-hint {
  color: color-mix(in srgb, var(--ds-a) 65%, var(--muted));
}

/* Palette drawer */
.drawer-sum--radar { --ds-a: #3ee8d5; --ds-glow: rgba(62, 232, 213, 0.4); }
.drawer-sum--detail { --ds-a: #6eb5ff; --ds-glow: rgba(110, 181, 255, 0.4); }
.drawer-sum--fav { --ds-a: #ffc857; --ds-glow: rgba(255, 200, 87, 0.42); }
.drawer-sum--save { --ds-a: #8b9cff; --ds-glow: rgba(139, 156, 255, 0.4); }
.drawer-sum--mei { --ds-a: #ff8f5a; --ds-glow: rgba(255, 143, 90, 0.42); }
.drawer-sum--pick { --ds-a: #ff6b8a; --ds-glow: rgba(255, 107, 138, 0.4); }
.drawer-sum--broker { --ds-a: #5dffa8; --ds-glow: rgba(93, 255, 168, 0.35); }
.drawer-sum--path { --ds-a: #7dffb8; --ds-glow: rgba(125, 255, 184, 0.35); }
.drawer-sum--math { --ds-a: #c89bff; --ds-glow: rgba(200, 155, 255, 0.42); }
.drawer-sum--learn { --ds-a: #e07cff; --ds-glow: rgba(224, 124, 255, 0.4); }
.drawer-sum--verify { --ds-a: #5dffa0; --ds-glow: rgba(93, 255, 160, 0.38); }
.drawer-sum--guide { --ds-a: #5ec8ff; --ds-glow: rgba(94, 200, 255, 0.4); }
.drawer-sum--edu { --ds-a: #ffd166; --ds-glow: rgba(255, 209, 102, 0.38); }

/* Animazioni icona per tipologia drawer */
.dsum-icon-radar { animation: dsum-radar-sweep 3s linear infinite; }
.dsum-icon-radar::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1.5px solid var(--ds-a);
  animation: dsum-radar-ping 2.2s ease-out infinite;
}
.dsum-icon-chart { animation: dsum-chart-bob 2.4s ease-in-out infinite; }
.dsum-icon-chart::before {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 6px;
  width: 2px;
  height: 7px;
  border-radius: 1px;
  background: var(--ds-a);
  box-shadow: 5px 2px 0 color-mix(in srgb, var(--ds-a) 70%, transparent), 9px -2px 0 var(--ds-a);
  animation: dsum-bars 1.3s ease-in-out infinite;
}
.dsum-icon-star { color: var(--ds-a); animation: dsum-star-pulse 2s ease-in-out infinite; }
.dsum-icon-save { animation: dsum-save-bounce 2.2s ease-in-out infinite; }
.dsum-icon-burst { animation: dsum-rocket 1.5s cubic-bezier(0.45, 0, 0.2, 1.2) infinite; }
.dsum-icon-target { animation: dsum-target-zoom 2s ease-in-out infinite; }
.dsum-icon-target::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1.5px solid var(--ds-a);
  border-radius: 50%;
  animation: dsum-ring 2.4s ease-out infinite;
}
.dsum-icon-signal { animation: dsum-signal-wag 2s ease-in-out infinite; }
.dsum-icon-path {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ds-a);
  animation: dsum-path-rise 2.2s ease-in-out infinite;
}
.dsum-icon-math {
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--ds-a);
  animation: dsum-math-glow 2.6s ease-in-out infinite;
}
.dsum-icon-brain { animation: dsum-brain-think 2.8s ease-in-out infinite; }
.dsum-icon-verify {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--ds-a);
  animation: dsum-check-pop 2.4s ease-in-out infinite;
}
.dsum-icon-book { animation: dsum-book-flip 4s ease-in-out infinite; }
.dsum-icon-edu { animation: dsum-bulb-glow 2.5s ease-in-out infinite; }

.illogico-drawer[open] .illogico-drawer-body {
  animation: drawer-body-in 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.illogico-drawer-body {
  padding: 0 1.1rem 1.1rem;
  border-top: none;
}
.illogico-drawer-body .illogico-tools { margin-top: 0.85rem; }

@keyframes drawer-body-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes dsum-radar-sweep {
  to { transform: rotate(360deg); }
}
@keyframes dsum-radar-ping {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}
@keyframes dsum-chart-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes dsum-bars {
  0%, 100% { transform: scaleY(0.7); }
  50% { transform: scaleY(1.1); }
}
@keyframes dsum-star-pulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.15); filter: brightness(1.45); }
}
@keyframes dsum-save-bounce {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(3px); }
  60% { transform: translateY(-2px); }
}
@keyframes dsum-rocket {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-5px) rotate(6deg); }
}
@keyframes dsum-target-zoom {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
@keyframes dsum-ring {
  0% { transform: scale(0.85); opacity: 0.7; }
  100% { transform: scale(1.3); opacity: 0; }
}
@keyframes dsum-signal-wag {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(5deg); }
}
@keyframes dsum-path-rise {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(3px, -4px); }
}
@keyframes dsum-math-glow {
  0%, 100% { text-shadow: 0 0 6px var(--ds-glow); }
  50% { text-shadow: 0 0 14px var(--ds-glow), 0 0 22px color-mix(in srgb, var(--ds-a) 35%, transparent); }
}
@keyframes dsum-brain-think {
  0%, 100% { transform: scale(1); }
  33% { transform: scale(1.06) rotate(-4deg); }
  66% { transform: scale(1.06) rotate(4deg); }
}
@keyframes dsum-check-pop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}
@keyframes dsum-book-flip {
  0%, 88%, 100% { transform: perspective(40px) rotateY(0deg); }
  92% { transform: perspective(40px) rotateY(-20deg); }
  96% { transform: perspective(40px) rotateY(12deg); }
}
@keyframes dsum-bulb-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.35); }
}

@media (prefers-reduced-motion: reduce) {
  .dsum-icon,
  .dsum-icon::before,
  .dsum-icon::after,
  .illogico-drawer[open] .illogico-drawer-body {
    animation: none !important;
  }
  .drawer-sum::after { display: none; }
}

/* ── Hub Preferiti & Portafoglio ── */
.hub-drawer { margin-bottom: 0.75rem; }
.preferiti-portafoglio-wrap { margin: 0; }
.fav-loading { font-size: 0.75rem; color: var(--muted); padding: 0.5rem 0; }
.hub-shell { padding: 1rem 1.1rem 1.1rem; }
.hub-toolbar-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.fav-add-row--prominent {
  flex: 1 1 220px;
  margin-bottom: 0;
  align-items: flex-end;
}
.fav-add-label {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--emerald);
  width: 100%;
}
.hub-stats--compact {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}
.hub-stats--compact .hub-stat {
  min-width: 2.6rem;
  padding: 0.35rem 0.45rem;
}
.hub-stats--compact .hub-stat-n { font-size: 0.95rem; }
.hub-stats--compact .hub-stat-l { font-size: 0.52rem; margin-top: 0.05rem; }
.hub-tab-n {
  font-size: 0.62rem;
  opacity: 0.75;
  margin-left: 0.2rem;
}
.hub-filter-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.65rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  background: var(--surface-inset);
  border: 1px solid var(--border);
}
.hub-filter-inline-label {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.hub-filter-hint {
  font-size: 0.62rem;
  color: var(--muted);
  margin-left: auto;
}
.hub-build-id {
  font-size: 0.55rem;
  color: var(--muted);
  opacity: 0.45;
  margin: 0.5rem 0 0;
  text-align: right;
}
.hub-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.hub-stat {
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  background: var(--glass-bg-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-edge);
  text-align: center;
}
.hub-stat-n {
  display: block;
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--heading);
  line-height: 1.2;
}
.hub-stat-n.sm { font-size: 0.78rem; }
.hub-stat-l {
  display: block;
  font-size: 0.58rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.15rem;
}
.hub-stat-mode .hub-stat-l { margin-bottom: 0.1rem; }
.hub-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}
.hub-tab {
  flex: 1;
  font-size: 0.72rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px 8px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.hub-tab.is-on {
  color: var(--emerald);
  background: rgba(93, 191, 160, 0.08);
  border-color: var(--border);
  border-bottom-color: transparent;
  margin-bottom: -1px;
}
.hub-panel { display: none; }
.hub-panel.is-visible { display: block; }
.hub-panel-head { margin-bottom: 0.65rem; }
.hub-panel-head h4 { font-size: 0.88rem; color: var(--heading); margin: 0 0 0.2rem; }
.hub-panel-head p { font-size: 0.7rem; color: var(--muted); line-height: 1.45; margin: 0; }
.fav-filter-toggle { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.fav-filter-btn {
  font-size: 0.68rem;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--btn-secondary-bg);
  color: var(--muted);
  cursor: pointer;
}
.fav-filter-btn.is-on {
  border-color: rgba(93, 191, 160, 0.55);
  background: rgba(93, 191, 160, 0.12);
  color: var(--emerald);
}
.fav-add-row, .fav-pf-toolbar, .fav-pos-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: flex-end;
  margin-bottom: 0.65rem;
}
.fav-pf-field { display: flex; flex-direction: column; gap: 0.2rem; }
.fav-pf-field span { font-size: 0.58rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.fav-select, .fav-input {
  font-size: 0.72rem;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
}
.fav-num { width: 6rem; }
.hub-pf-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}
.hub-pf-summary > div {
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: rgba(30, 38, 50, 0.45);
  border: 1px solid var(--border);
}
.hub-pf-summary b { display: block; font-size: 0.9rem; color: var(--heading); }
.hub-pf-summary span { font-size: 0.58rem; color: var(--muted); }
.hub-pf-summary .up b { color: var(--emerald); }
.hub-pf-summary .dn b { color: #e07070; }
.fav-pos-form-details, .fav-csv-details {
  margin: 0.45rem 0 0.65rem;
  font-size: 0.72rem;
  color: var(--muted);
}
.fav-pos-form-details summary, .fav-csv-details summary {
  cursor: pointer;
  color: var(--emerald);
  font-weight: 500;
}
.fav-csv-hint { margin: 0.35rem 0; font-size: 0.68rem; }
.fav-csv-area {
  width: 100%;
  margin: 0.4rem 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(15, 20, 28, 0.8);
  color: var(--text);
  resize: vertical;
}
.fav-pos-table-wrap { overflow-x: auto; margin-top: 0.35rem; }
.fav-pos-table {
  width: 100%;
  font-size: 0.7rem;
  border-collapse: collapse;
}
.fav-pos-table th, .fav-pos-table td {
  padding: 0.45rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.fav-pos-table th { color: var(--muted); font-weight: 500; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.03em; }
.fav-tbl-sym { color: var(--gold); }
.fav-tbl-sub { display: block; font-size: 0.62rem; color: var(--muted); font-weight: 400; }
.fav-tbl-name { color: var(--text); max-width: 12rem; }
.fav-tbl-act { white-space: nowrap; }
.fav-pos-table .up { color: var(--emerald); }
.fav-pos-table .dn { color: #e07070; }
.fav-chip-rm, .fav-pos-rm {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  padding: 0.15rem 0.35rem;
}
.fav-pos-link,
.fav-analyze-btn {
  border: 1px solid rgba(93, 191, 160, 0.35);
  background: rgba(93, 191, 160, 0.08);
  color: var(--emerald);
  cursor: pointer;
  font-size: 0.66rem;
  font-family: var(--mono);
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  transition: background 0.2s, border-color 0.2s;
}
.fav-analyze-btn:hover {
  background: rgba(93, 191, 160, 0.16);
  border-color: rgba(93, 191, 160, 0.55);
}
.fav-analyze-btn.is-busy {
  opacity: 0.55;
  cursor: wait;
  pointer-events: none;
}
/* Preferiti — card per riga (grafico non schiaccia i pulsanti) */
.fav-list-cards-wrap { margin-top: 0.5rem; }
.fav-list-cards {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.fav-card {
  padding: 0.6rem 0.65rem 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-soft);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  box-shadow: inset 0 1px 0 var(--glass-edge), 0 4px 16px rgba(0, 0, 0, 0.05);
}
.fav-card.is-wait { opacity: 0.88; }
.fav-card.is-analyzed {
  border-color: rgba(0, 230, 118, 0.28);
  box-shadow: 0 0 0 1px rgba(0, 230, 118, 0.06);
}
.fav-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.fav-card-id {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.fav-card-name {
  font-size: 0.62rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9rem;
}
.fav-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
}
.fav-card-price {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text);
}
.fav-card-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.5rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.fav-card-actions .fav-analyze-btn { flex: 1; text-align: center; }
.fav-card-actions .fav-chip-rm { margin-left: auto; }

/* Portafoglio — grafico in cella impilato */
.fav-tbl-chart {
  width: 7.5rem;
  max-width: 7.5rem;
  padding: 0.35rem 0.35rem !important;
  vertical-align: top;
}
.fav-tbl-chart-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
}
.fav-tbl-act {
  white-space: nowrap;
  width: 1%;
  vertical-align: middle;
  padding-left: 0.35rem !important;
}
.fav-list-table { table-layout: auto; }
.fav-pos-table.fav-list-table { table-layout: fixed; }

.fav-mini-chart {
  position: relative;
  display: block;
  width: 100%;
  min-height: 44px;
}
.fav-mini-chart.is-wait { opacity: 0.75; }
.fav-mini-spark {
  display: block;
  width: 100%;
  height: 44px;
  border-radius: 6px;
  background: rgba(12, 18, 28, 0.65);
  border: 1px solid rgba(107, 159, 212, 0.2);
}
.fav-card.is-analyzed .fav-mini-spark,
.fav-row.is-analyzed .fav-mini-spark {
  border-color: rgba(0, 230, 118, 0.35);
  box-shadow: 0 0 0 1px rgba(0, 230, 118, 0.08);
}
.fav-mini-badge {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.15rem 0.3rem;
  border-radius: 4px;
  line-height: 1.1;
  min-width: 2.4rem;
  text-align: center;
}
.fav-mini-badge.up {
  color: #00E676;
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.25);
}
.fav-mini-badge.dn {
  color: #FF5252;
  background: rgba(255, 82, 82, 0.1);
  border: 1px solid rgba(255, 82, 82, 0.25);
}
.fav-mini-badge.neutral {
  color: #7a8fa6;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.fav-mini-badge.flat {
  color: #90A4AE;
  background: rgba(144, 164, 174, 0.08);
  border: 1px solid rgba(144, 164, 174, 0.22);
}
.fav-list-table .fav-tbl-last {
  font-family: var(--mono);
  font-size: 0.68rem;
}
.fav-pos-empty { color: var(--muted); text-align: center; padding: 1rem !important; }
.fav-broker-note {
  font-size: 0.66rem;
  color: #7a8fa6;
  margin-top: 0.65rem;
  line-height: 1.45;
}
.fav-star-btn {
  border: none;
  background: transparent;
  color: #6d8094;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0 0.15rem;
}
.fav-star-btn.is-on { color: var(--gold); }
.spec-card.is-favorite { box-shadow: 0 0 0 1px rgba(212, 174, 114, 0.35); }
.fav-sync-btn { font-size: 0.68rem !important; }
.hub-filter-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}
.hub-filter-card {
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(20, 28, 38, 0.45);
}
.hub-filter-card.is-on {
  border-color: rgba(93, 191, 160, 0.45);
  background: rgba(93, 191, 160, 0.06);
}
.hub-filter-card h5 { font-size: 0.82rem; color: var(--heading); margin: 0 0 0.35rem; }
.hub-filter-card p { font-size: 0.68rem; color: var(--muted); line-height: 1.45; margin: 0 0 0.55rem; }
.hub-filter-pick { font-size: 0.68rem !important; padding: 0.35rem 0.65rem !important; }
.hub-filter-foot { font-size: 0.68rem; color: var(--muted); margin: 0; }
.hub-build-id {
  margin: 0.35rem 0 0;
  font-family: var(--mono);
  font-size: 0.52rem;
  color: rgba(93, 191, 160, 0.45);
  letter-spacing: 0.04em;
}

/* ── Speculazione — zone separate ── */
.suite-zone { margin-bottom: 1.25rem; }
.suite-zone-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--emerald);
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.suite-zone-head { margin-bottom: 0.85rem; }
.suite-zone-head .suite-explainer { margin-top: 0; }
.suite-zone-actions .illogico-actions { margin: 0; }
.suite-zone-analysis .illogico-tools { margin-top: 0; }
.suite-zone-picks .illogico-picks-row { margin-bottom: 0; }
.suite-zone-extra .broker-strip { margin-bottom: 0.75rem; }
.spec-day-section {
  margin: 0 0 0.85rem;
  scroll-margin-top: calc(var(--nav-offset) + 1rem);
}
.illogico-below-fold > .spec-day-section {
  margin-top: 1.25rem;
  margin-bottom: 0.65rem;
}
.spec-day-section-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
  line-height: 1.45;
}
.spec-day-section-hint a { color: var(--emerald); }

/* ── Speculazione del giorno ── */
.spec-day-box {
  padding: 1rem 1.1rem;
  border: 2px solid rgba(212, 174, 114, 0.45);
  background: linear-gradient(145deg, rgba(212, 174, 114, 0.1), rgba(18, 26, 38, 0.55));
}
.spec-day-loading, .spec-day-empty p {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}
.spec-day-empty h3 {
  font-size: 1rem;
  color: var(--heading);
  margin: 0.25rem 0 0.35rem;
}
.spec-day-kicker {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.spec-day-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}
.spec-day-head h3 {
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--heading);
  margin: 0.2rem 0;
}
.spec-day-sub {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
  max-width: 36rem;
}
.spec-day-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(212, 174, 114, 0.2);
  border-bottom: 1px solid rgba(212, 174, 114, 0.2);
  margin-bottom: 0.65rem;
}
.spec-day-pick {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.spec-day-rank {
  display: block;
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--gold);
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
}
.spec-day-sym {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--heading);
  margin: 0;
  line-height: 1.1;
}
.spec-day-name {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0.15rem 0 0;
}
.spec-day-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
}
.spec-day-kpis > div {
  text-align: center;
  min-width: 3.5rem;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  background: rgba(12, 18, 28, 0.45);
  border: 1px solid var(--border);
}
.spec-day-kpis b {
  display: block;
  font-size: 0.95rem;
  color: var(--emerald);
}
.spec-day-kpis span {
  font-size: 0.55rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.spec-day-action {
  font-size: 0.74rem;
  color: #9eb0c4;
  margin: 0 0 0.65rem;
}
.spec-day-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}
.spec-day-note {
  font-size: 0.62rem;
  color: #6d8094;
  flex: 1 1 12rem;
}
.suite-filter-bar { margin: 0.5rem 0 0.35rem; }
.suite-filter-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: rgba(30, 38, 50, 0.5);
  border: 1px solid var(--border);
}
.suite-filter-label {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 500;
}
.suite-filter-link {
  font-size: 0.68rem;
  color: var(--emerald);
  margin-left: auto;
}

.suite-explainer {
  margin: 0.85rem 0 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(93, 191, 160, 0.08);
  border: 1px solid rgba(93, 191, 160, 0.22);
  font-size: 0.78rem;
  color: #9eb0c4;
  line-height: 1.55;
}
.suite-explainer strong { color: var(--heading); }
.suite-explainer a { color: var(--emerald); }
.suite-scan-status {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: #6d8094;
  margin: 0 0 0.65rem;
  letter-spacing: 0.03em;
}
.suite-scan-status.is-live { color: var(--emerald); }
.box-hint {
  flex: 1 1 100%;
  margin: 0.2rem 0 0;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.4;
}
.spec-head { flex-wrap: wrap; }

/* ── Picks row: Very Spec + Safe Growth ── */
.illogico-picks-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.very-spec-box {
  border: 2px solid rgba(212, 174, 114, 0.65);
  background: linear-gradient(160deg, rgba(212, 174, 114, 0.18), rgba(30, 38, 50, 0.95));
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 0;
}
.very-spec-box.card-3d::before { border-radius: var(--radius); }
.very-spec-inner { padding: 1rem; position: relative; z-index: 1; }
.very-spec-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  border: 1px solid rgba(212, 174, 114, 0.5);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.4rem;
}
.very-spec-badge.blink { animation: focusBlink 2s ease infinite; }
@keyframes focusBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.very-spec-head h3 { font-family: var(--display); font-size: 1.1rem; color: var(--heading); }
.very-spec-motto { font-size: 0.74rem; color: var(--muted); margin-bottom: 0.85rem; }
.very-spec-motto strong { color: var(--gold); }
.very-hero {
  padding: 1rem;
  border-radius: 14px;
  border: 2px solid rgba(212, 174, 114, 0.55);
  background: rgba(20, 28, 38, 0.85);
  margin-bottom: 0.65rem;
}
.very-hero-top { display: flex; justify-content: space-between; margin-bottom: 0.35rem; }
.very-rank { font-family: var(--mono); font-size: 0.58rem; color: var(--gold); font-weight: 700; }
.very-tier { font-family: var(--mono); font-size: 0.52rem; color: var(--emerald); }
.very-sym { font-family: var(--display); font-size: 1.65rem; color: var(--gold); margin: 0; }
.very-name { font-size: 0.72rem; color: var(--muted); margin-bottom: 0.65rem; }
.very-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; margin-bottom: 0.55rem; }
.very-kpis div { text-align: center; padding: 0.4rem; border-radius: 8px; background: var(--surface3); border: 1px solid var(--border); }
.very-kpis b { display: block; font-size: 0.95rem; color: var(--emerald); }
.very-kpis small { font-family: var(--mono); font-size: 0.48rem; color: var(--muted); }
.very-proj { font-size: 0.75rem; color: var(--blue); margin-bottom: 0.55rem; }
.very-rest { display: flex; flex-direction: column; gap: 0.4rem; }
.very-mini {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(40, 52, 66, 0.6);
  cursor: pointer;
}
.very-mini-sym { font-family: var(--mono); font-weight: 700; color: var(--gold); }
.very-warn { font-size: 0.65rem; color: var(--muted); margin-top: 0.65rem; border-left: 2px solid var(--gold); padding-left: 0.5rem; }
.pick-focus-btn {
  font-family: var(--mono);
  font-size: 0.62rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(212, 174, 114, 0.5);
  background: rgba(212, 174, 114, 0.15);
  color: var(--gold);
  cursor: pointer;
}
.rapid-growth-box {
  border: 1px solid rgba(93, 191, 160, 0.45);
  background: linear-gradient(145deg, rgba(93, 191, 160, 0.1), rgba(40, 52, 66, 0.9));
  border-radius: var(--radius);
}
.safe-growth-inner { padding: 1rem; }
.safe-growth-inner h3 { font-family: var(--display); font-size: 1.05rem; color: var(--heading); }
.safe-sub { font-size: 0.72rem; color: var(--muted); margin-bottom: 0.75rem; }
.safe-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.safe-card { padding: 0.65rem; border-radius: 10px; border: 1px solid var(--border); background: rgba(40, 52, 66, 0.7); cursor: pointer; }
.safe-card h4 { font-family: var(--mono); font-size: 0.95rem; color: var(--gold); margin: 0; }
.safe-v { font-family: var(--mono); font-size: 0.48rem; color: var(--emerald); }
.safe-cur { font-family: var(--mono); font-size: 0.48rem; color: var(--gold); }
.picks-empty { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.broker-strip { margin-bottom: 1rem; padding: 0.85rem 1rem; border: 1px solid rgba(107, 159, 212, 0.3); border-radius: var(--radius); }
.broker-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.broker-chip {
  font-family: var(--mono);
  font-size: 0.58rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface3);
}
.broker-chip.bias-bull, .broker-chip.bias-breakout { border-color: rgba(93, 191, 160, 0.35); color: var(--emerald); }
.broker-chip.bias-caution, .broker-chip.bias-risk { border-color: rgba(220, 100, 100, 0.3); color: var(--red); }
.broker-chip.bias-spec, .broker-chip.bias-catalyst { color: var(--gold); }
.saved-predictions-wrap { margin-top: 1rem; padding: 1rem 1.1rem; }
.saved-card { padding: 0.75rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface2); margin-bottom: 0.55rem; }
.saved-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 0.62rem; }
.action-btn.saved-ok { border-color: var(--emerald); color: var(--emerald); }
.illogico-broker-inline { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.65rem; }
.broker-chip-sm { font-family: var(--mono); font-size: 0.52rem; padding: 0.15rem 0.4rem; border-radius: 4px; border: 1px solid var(--border); }

/* Ricerca mirata + Speculazione */
.illogico-tools {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.15rem;
  margin-bottom: 1.25rem;
}
.illogico-target,
.illogico-speculation {
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius);
}
.illogico-target.card-3d::before,
.illogico-speculation.card-3d::before { border-radius: var(--radius); }

.illogico-target {
  border: 1px solid rgba(107, 159, 212, 0.35);
  background: linear-gradient(155deg, rgba(107, 159, 212, 0.08), var(--surface));
}
.target-head h3 {
  font-family: var(--display);
  font-size: 1rem;
  color: var(--heading);
  margin-bottom: 0.25rem;
}
.target-head p {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}
.target-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.target-select,
.target-custom {
  flex: 1;
  min-width: 140px;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface3);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.75rem;
}
.target-custom { max-width: 160px; flex: 0 1 160px; }
.target-btn {
  padding: 0.55rem 1rem !important;
  font-size: 0.78rem !important;
  white-space: nowrap;
}
.target-placeholder {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}
.target-alias {
  font-size: 0.72rem;
  color: var(--gold);
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  background: rgba(212, 174, 114, 0.12);
  border: 1px solid rgba(212, 174, 114, 0.3);
  margin-bottom: 0.5rem;
}
.target-card { animation: specFade 0.35s ease; }
@keyframes specFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.target-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.target-sym {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  margin-right: 0.4rem;
}
.target-name { font-size: 0.82rem; color: var(--muted); }
.target-tier {
  display: inline-block;
  margin-left: 0.35rem;
  font-family: var(--mono);
  font-size: 0.55rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  background: var(--surface3);
  color: var(--blue);
}
.mei-gauge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}
.mei-bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--surface3);
  overflow: hidden;
}
.mei-bar span {
  display: block;
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}
.mei-val {
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--emerald);
}
.mei-lbl {
  font-family: var(--mono);
  font-size: 0.55rem;
  color: var(--muted);
}
.target-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}
.target-kpis div {
  text-align: center;
  padding: 0.4rem;
  border-radius: 8px;
  background: var(--surface3);
  border: 1px solid var(--border);
}
.target-kpis b {
  display: block;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--heading);
}
.target-kpis span {
  font-family: var(--mono);
  font-size: 0.48rem;
  color: var(--muted);
}
.target-pattern {
  font-size: 0.78rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.target-proj {
  display: flex;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  margin-bottom: 0.45rem;
}
.target-proj .up { color: var(--emerald); }
.target-cross {
  font-family: var(--mono);
  font-size: 0.65rem;
  margin-bottom: 0.35rem;
}
.target-cross.ok { color: var(--emerald); }
.target-cross.warn { color: var(--red); }
.target-narrative {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0.65rem;
}
.target-detail-btn {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(93, 191, 160, 0.4);
  background: var(--emerald-soft);
  color: var(--emerald);
  cursor: pointer;
}
.target-detail-btn:hover { filter: brightness(1.1); }

.illogico-speculation {
  border: 1px solid rgba(212, 174, 114, 0.5);
  background: linear-gradient(145deg, rgba(212, 174, 114, 0.14), rgba(40, 52, 66, 0.9) 50%);
  position: relative;
  overflow: hidden;
}
.illogico-speculation::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -30%;
  width: 60%;
  height: 120%;
  background: radial-gradient(circle, rgba(212, 174, 114, 0.12), transparent 65%);
  pointer-events: none;
}
.spec-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}
.spec-head h3 {
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--heading);
}
.spec-tagline {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--gold);
  letter-spacing: 0.06em;
}
.spec-pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
  animation: specPulse 1.8s ease infinite;
}
@keyframes specPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}
.spec-formula {
  position: relative;
  z-index: 1;
  margin-bottom: 0.75rem;
}
.spec-formula code {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--blue);
}
.spec-loading {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  position: relative;
  z-index: 1;
}
.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  position: relative;
  z-index: 1;
}
.spec-card {
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(40, 52, 66, 0.75);
  transition: transform 0.2s, box-shadow 0.2s;
}
.spec-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(10, 18, 30, 0.35);
}
.spec-card.spec-hero {
  grid-column: span 1;
  border-color: rgba(212, 174, 114, 0.55);
  background: linear-gradient(145deg, rgba(212, 174, 114, 0.15), rgba(40, 52, 66, 0.85));
}
.spec-card.spec-explosion { border-color: rgba(212, 174, 114, 0.6); }
.spec-card.spec-surge { border-color: rgba(93, 191, 160, 0.45); }
.spec-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}
.spec-rank {
  font-family: var(--mono);
  font-size: 0.55rem;
  color: var(--muted);
}
.spec-tier-badge {
  font-family: var(--mono);
  font-size: 0.48rem;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.spec-tier-badge.spec-explosion {
  background: rgba(212, 174, 114, 0.3);
  color: var(--gold);
}
.spec-tier-badge.spec-surge {
  background: var(--emerald-soft);
  color: var(--emerald);
}
.spec-tier-badge.spec-ignite {
  background: rgba(212, 137, 137, 0.2);
  color: #e8a87c;
}
.spec-tier-badge.spec-pressure {
  background: rgba(107, 159, 212, 0.15);
  color: var(--blue);
}
.spec-sym {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
}
.spec-name {
  font-size: 0.65rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.spec-mei-row {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  margin-bottom: 0.4rem;
}
.spec-mei {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--emerald);
  line-height: 1;
}
.spec-mei-label {
  font-family: var(--mono);
  font-size: 0.55rem;
  color: var(--muted);
}
.spec-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.4rem;
  text-align: center;
}
.spec-stats b {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--heading);
}
.spec-stats small {
  font-size: 0.48rem;
  color: var(--muted);
}
.spec-action {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--emerald);
  margin-bottom: 0.45rem;
}
.spec-pick-btn {
  width: 100%;
  padding: 0.35rem;
  border: none;
  border-radius: 6px;
  background: rgba(212, 174, 114, 0.2);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.6rem;
  cursor: pointer;
}
.spec-pick-btn:hover { background: rgba(212, 174, 114, 0.35); }
.spec-empty {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Radar — box risultati principale */
.illogico-radar {
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid rgba(212, 174, 114, 0.35);
  background: linear-gradient(155deg, rgba(212, 174, 114, 0.09), var(--surface) 45%);
  box-shadow: var(--shadow-deep);
}
.illogico-radar.card-3d::before { border-radius: var(--radius); }
.radar-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.radar-title {
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--heading);
  margin-bottom: 0.3rem;
}
.radar-sub {
  font-size: var(--text-sm);
  color: #b8c5d4;
  line-height: 1.55;
  max-width: 36rem;
}
.radar-sub a { color: var(--emerald); }
.radar-kpis {
  display: flex;
  gap: 0.65rem;
}
.radar-kpis div {
  text-align: center;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: var(--surface3);
  border: 1px solid var(--border);
  min-width: 72px;
}
.radar-kpis b {
  display: block;
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--gold);
}
.radar-kpis span {
  font-family: var(--mono);
  font-size: 0.5rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.radar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}
.radar-col {
  padding: 0.85rem;
  border-radius: 12px;
  background: rgba(40, 52, 66, 0.55);
  border: 1px solid var(--border);
  min-height: 120px;
}
.radar-col h4 {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 0.25rem;
}
.radar-count {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--emerald);
  font-weight: 400;
}
.radar-col-desc {
  font-size: var(--text-sm);
  color: #b8c5d4;
  line-height: 1.55;
  margin-bottom: 0.55rem;
}
.radar-none {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  font-style: italic;
}
.radar-rows {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 200px;
  overflow-y: auto;
}
.radar-rows::-webkit-scrollbar { width: 3px; }
.radar-rows::-webkit-scrollbar-thumb { background: var(--border); }
.radar-row {
  display: grid;
  grid-template-columns: 58px 1fr auto auto auto auto;
  gap: 0.4rem;
  align-items: center;
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--surface2);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, transform 0.15s;
}
.radar-row:hover {
  border-color: rgba(93, 191, 160, 0.4);
  transform: translateX(3px);
}
.radar-sym {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--gold);
}
.radar-name {
  font-size: 0.65rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.radar-pat {
  font-family: var(--mono);
  font-size: 0.55rem;
  color: var(--text);
  display: none;
}
.radar-proj {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
}
.radar-proj.up { color: var(--emerald); }
.radar-proj.dn { color: var(--red); }
.radar-prob {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--blue);
}
.radar-act {
  font-family: var(--mono);
  font-size: 0.55rem;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
}
.radar-act.long { background: var(--emerald-soft); color: var(--emerald); }
.radar-act.short { background: var(--red-soft); color: var(--red); }
.radar-act.exit { background: rgba(212, 174, 114, 0.18); color: var(--gold); }
.radar-tag {
  font-family: var(--mono);
  font-size: 0.5rem;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  white-space: nowrap;
}
.radar-tag.tag-gold { background: rgba(212, 174, 114, 0.25); color: var(--gold); }
.radar-tag.tag-silver { background: rgba(107, 159, 212, 0.2); color: var(--blue); }
.radar-tag.tag-warn { background: rgba(212, 137, 137, 0.2); color: var(--red); }
.radar-tag.tag-up { background: var(--emerald-soft); color: var(--emerald); }
.radar-tag.tag-dn { background: var(--red-soft); color: var(--red); }
.radar-foot {
  margin-top: 0.75rem;
  font-size: 0.68rem;
  color: var(--muted);
}
.illogico-radar-hint {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 1rem;
}

.illogico-hero-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.illogico-hero-card {
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(145deg, var(--surface2), var(--surface));
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}
.illogico-hero-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-deep);
}
.illogico-hero-card.tier-gold {
  border-color: rgba(212, 174, 114, 0.45);
  background: linear-gradient(145deg, rgba(212, 174, 114, 0.1), var(--surface));
}
.illogico-hero-card.tier-silver {
  border-color: rgba(107, 159, 212, 0.4);
  background: linear-gradient(145deg, rgba(107, 159, 212, 0.08), var(--surface));
}
.illogico-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}
.illogico-hero-tier {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--gold);
}
.illogico-hero-card.tier-silver .illogico-hero-tier { color: var(--blue); }
.illogico-hero-hit {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
}
.illogico-hero-card h4 {
  font-family: var(--display);
  font-size: 0.92rem;
  color: var(--heading);
  margin-bottom: 0.5rem;
}
.illogico-hit-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--surface3);
  overflow: hidden;
  margin-bottom: 0.45rem;
}
.illogico-hit-bar span {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--emerald), var(--blue));
  transition: width 0.6s ease;
}
.illogico-hero-card.tier-gold .illogico-hit-bar span {
  background: linear-gradient(90deg, var(--gold), var(--emerald));
}
.illogico-hero-meta {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
}
.illogico-hero-meta b { color: var(--emerald); }
.illogico-head h2 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--emerald), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.illogico-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.sector-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.sector-btn {
  font-family: var(--mono);
  font-size: 0.62rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  cursor: pointer;
}
.sector-btn.active,
.sector-btn:hover {
  color: var(--emerald);
  border-color: rgba(93, 191, 160, 0.4);
  background: var(--emerald-soft);
}
.illogico-action-btns { display: flex; gap: 0.5rem; }
.action-btn {
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--btn-secondary-bg);
  color: var(--text);
  cursor: pointer;
}
.action-btn:hover { border-color: var(--emerald); color: var(--emerald); }

.illogico-compare-wrap {
  padding: 1rem 1.15rem;
  margin-bottom: 1.15rem;
  border-radius: var(--radius);
}
.illogico-compare-wrap.card-3d::before { border-radius: var(--radius); }
.illogico-compare-wrap h4 {
  font-family: var(--display);
  font-size: 0.9rem;
  margin-bottom: 0.65rem;
  color: var(--heading);
}
.compare-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.compare-controls select {
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface3);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.72rem;
}
.compare-vs { font-family: var(--mono); font-size: 0.65rem; color: var(--muted); }
.compare-run-btn { padding: 0.4rem 0.85rem !important; font-size: 0.72rem !important; }
.compare-result { font-size: 0.78rem; }
.compare-empty { color: var(--muted); }
.compare-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: stretch;
}
.compare-col {
  padding: 0.65rem;
  border-radius: 10px;
  background: var(--surface3);
  border: 1px solid var(--border);
}
.compare-col h4 {
  font-family: var(--mono);
  color: var(--gold);
  margin-bottom: 0.2rem;
}
.compare-col p { font-size: 0.68rem; color: var(--muted); margin-bottom: 0.4rem; }
.compare-stat { font-family: var(--mono); font-size: 0.62rem; margin-bottom: 0.2rem; color: var(--text); }
.compare-stat b { color: var(--emerald); }
.compare-mid {
  text-align: center;
  padding: 0.5rem;
  align-self: center;
}
.compare-mid span { display: block; font-size: 0.58rem; color: var(--muted); }
.compare-mid b { font-size: 1.2rem; color: var(--gold); }
.compare-mid small { font-size: 0.55rem; color: var(--blue); }

.illogico-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1.25rem;
  align-items: stretch;
}
.illogico-viz-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.viz-tooltip {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  background: rgba(30, 40, 52, 0.95);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--text);
  line-height: 1.45;
  max-width: 200px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}
.viz-tooltip b { color: var(--gold); }

.som-legend {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
}
.som-legend.card-3d::before { border-radius: var(--radius); }
.som-legend h4 {
  font-family: var(--display);
  font-size: 0.82rem;
  color: var(--heading);
  margin-bottom: 0.55rem;
}
.som-legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
}
.som-legend-grid > div {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.35;
}
.som-legend-grid strong { color: var(--text); }
.lg-dot {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  margin-top: 2px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.35);
}
.lg-dot.lg-gold {
  background: #ffc107;
  box-shadow: 0 0 10px rgba(255, 193, 7, 0.65);
  border-color: #ffe082;
}
.lg-dot.lg-silver {
  background: #00e5ff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.55);
  border-color: #80f7ff;
}
.lg-dot.lg-up {
  background: #00e676;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.55);
  border-color: #b9f6ca;
}
.lg-dot.lg-dn {
  background: #ff1744;
  box-shadow: 0 0 10px rgba(255, 23, 68, 0.55);
  border-color: #ff8a80;
}
.lg-dot.lg-neutral {
  background: #90a4ae;
  border-color: #eceff1;
}
.lg-ring {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid #ffea00;
  margin-top: 1px;
  box-shadow: 0 0 8px rgba(255, 234, 0, 0.5);
}
.lg-ring.lg-squeeze {
  border-color: #e8a87c;
  background: transparent;
}
@keyframes lg-march {
  to { background-position: 23px 0; }
}
.lg-line {
  flex-shrink: 0;
  width: 24px;
  height: 3px;
  margin-top: 5px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, rgba(255, 235, 59, 0.85), rgba(255, 235, 59, 0.85) 4px, transparent 4px, transparent 7px);
  background-size: 18px 100%;
  animation: lg-march 1.2s linear infinite;
}
.lg-line-proj-up {
  background: repeating-linear-gradient(90deg, rgba(0, 230, 118, 0.85), rgba(0, 230, 118, 0.85) 3px, transparent 3px, transparent 6px);
  background-size: 14px 100%;
  animation: lg-march 1.4s linear infinite;
}
.lg-line-proj-dn {
  background: repeating-linear-gradient(90deg, rgba(255, 23, 68, 0.85), rgba(255, 23, 68, 0.85) 3px, transparent 3px, transparent 6px);
  background-size: 14px 100%;
  animation: lg-march 1.4s linear infinite;
}
.lg-price {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 18px;
  margin-top: 2px;
  padding: 0 0.35rem;
  border-radius: 4px;
  font: 800 0.55rem Inter, system-ui, sans-serif;
  letter-spacing: 0.03em;
}
.lg-price-up {
  color: #0a1f14;
  background: rgba(0, 230, 118, 0.9);
}
.lg-price-dn {
  color: #fff;
  background: rgba(255, 23, 68, 0.88);
}
.lg-cell {
  flex-shrink: 0;
  width: 14px;
  height: 10px;
  margin-top: 3px;
  background: rgba(28, 38, 52, 0.9);
  border: 1px solid rgba(70, 95, 125, 0.5);
  border-radius: 2px;
}
.lg-size {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px rgba(93,191,160,0.25);
  margin-top: 3px;
}
.lg-fade {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(120,130,150,0.25);
  margin-top: 3px;
}
.som-legend-tip {
  margin-top: 0.55rem;
  font-size: 0.65rem;
  color: var(--blue);
  line-height: 1.4;
}

.illogico-score-panel { margin-bottom: 0.65rem; }
.isco-card {
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface3);
}
.isco-card.conf-alta { border-color: rgba(93,191,160,0.5); background: rgba(93,191,160,0.08); }
.isco-card.conf-media { border-color: rgba(212,174,114,0.4); }
.isco-card.conf-bassa { border-color: var(--border); }
.isco-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}
.isco-title {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.isco-tier {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}
.conf-alta .isco-tier { background: var(--emerald-soft); color: var(--emerald); }
.conf-media .isco-tier { background: rgba(212,174,114,0.2); color: var(--gold); }
.conf-bassa .isco-tier { background: rgba(120,130,150,0.2); color: var(--muted); }
.isco-big {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--heading);
  line-height: 1;
}
.isco-big span { font-size: 0.9rem; color: var(--muted); font-weight: 400; }
.isco-sub { font-size: 0.68rem; color: var(--muted); margin: 0.25rem 0 0.5rem; }
.isco-badges { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.isco-badge {
  font-family: var(--mono);
  font-size: 0.52rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: var(--surface2);
}
.isco-badge.squeeze { color: #e8a87c; }
.isco-badge.earnings { color: var(--blue); }
.isco-badge.cross { color: var(--emerald); }
.isco-badge.ver { color: var(--gold); }

.illogico-fusion-line {
  font-family: var(--mono);
  font-size: 0.72rem;
  margin-bottom: 0.5rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
}
.illogico-fusion-line.conf-alta { background: var(--emerald-soft); color: var(--emerald); }
.illogico-fusion-line.conf-media { background: rgba(212,174,114,0.12); color: var(--gold); }
.illogico-fusion-line.conf-bassa { color: var(--muted); }

.illogico-viz {
  position: relative;
  min-height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(160deg, #1e2836, #151d28);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-deep);
}
.illogico-viz::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(93, 191, 160, 0.12), transparent 55%);
  pointer-events: none;
  z-index: 1;
}
#illogico-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

/* Traiettoria SVG sopra canvas — numeri, frecce, animazione CSS */
.som-traj-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
  overflow: visible;
}
/* Proiezione Buscema — verde = r̂>0 (salita), rosso = r̂<0 (ribasso) */
.som-traj-line-proj-up-glow,
.som-traj-line-proj-dn-glow,
.som-traj-line-proj-neutral-glow {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 9 7;
}
.som-traj-line-proj-up-glow { stroke: rgba(0, 230, 118, 0.16); }
.som-traj-line-proj-dn-glow { stroke: rgba(255, 23, 68, 0.16); }
.som-traj-line-proj-neutral-glow { stroke: rgba(144, 164, 174, 0.14); }

.som-traj-line-proj-up,
.som-traj-line-proj-dn,
.som-traj-line-proj-neutral {
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 9 7;
  animation: som-traj-proj-march 1.5s linear infinite;
}
.som-traj-line-proj-up { stroke: rgba(0, 230, 118, 0.88); }
.som-traj-line-proj-dn { stroke: rgba(255, 23, 68, 0.88); }
.som-traj-line-proj-neutral { stroke: rgba(144, 164, 174, 0.75); }

.som-traj-line-proj-up-end,
.som-traj-line-proj-dn-end,
.som-traj-line-proj-neutral-end {
  stroke-width: 2;
}
.som-traj-line-proj-up-end { fill: rgba(0, 230, 118, 0.9); stroke: #fff; }
.som-traj-line-proj-dn-end { fill: rgba(255, 23, 68, 0.9); stroke: #fff; }
.som-traj-line-proj-neutral-end { fill: rgba(144, 164, 174, 0.85); stroke: #fff; }

@keyframes som-traj-proj-march {
  to { stroke-dashoffset: -32; }
}
.som-traj-arrow-proj.som-traj-line-proj-up-arrow { fill: rgba(0, 230, 118, 0.75); }
.som-traj-arrow-proj.som-traj-line-proj-dn-arrow { fill: rgba(255, 23, 68, 0.75); }
.som-traj-arrow-proj.som-traj-line-proj-neutral-arrow { fill: rgba(144, 164, 174, 0.65); }
.som-traj-arrow-proj {
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 1;
}
.som-traj-badge-proj {
  stroke-width: 1.5;
}
.som-traj-line-proj-up-badge { fill: rgba(10, 32, 22, 0.92); stroke: rgba(0, 230, 118, 0.75); }
.som-traj-line-proj-dn-badge { fill: rgba(32, 12, 18, 0.92); stroke: rgba(255, 23, 68, 0.75); }
.som-traj-line-proj-neutral-badge { fill: rgba(22, 28, 36, 0.92); stroke: rgba(144, 164, 174, 0.6); }
.som-traj-badge-proj-num {
  text-anchor: middle;
  font: 700 8px Inter, system-ui, sans-serif;
}
.som-traj-line-proj-up-badge-txt { fill: rgba(185, 255, 210, 0.98); }
.som-traj-line-proj-dn-badge-txt { fill: rgba(255, 200, 210, 0.98); }
.som-traj-line-proj-neutral-badge-txt { fill: rgba(220, 228, 238, 0.95); }
.som-traj-step-proj.is-end .som-traj-badge-proj {
  stroke-width: 2;
}
.som-traj-line-faint {
  fill: none;
  stroke: rgba(155, 168, 185, 0.28);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 3 5;
}
.som-traj-line-glow {
  fill: none;
  stroke: rgba(255, 235, 59, 0.12);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 10 8;
  animation: som-traj-march 1.4s linear infinite;
}
.som-traj-line {
  fill: none;
  stroke: rgba(255, 235, 59, 0.82);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 10 8;
  animation: som-traj-march 1.4s linear infinite;
}
@keyframes som-traj-march {
  to { stroke-dashoffset: -36; }
}
.som-traj-arrow {
  fill: rgba(255, 235, 59, 0.75);
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 1;
}
.som-traj-badge-bg {
  fill: rgba(22, 30, 42, 0.88);
  stroke: rgba(255, 235, 59, 0.65);
  stroke-width: 1.5;
}
.som-traj-step.is-now .som-traj-badge-bg {
  fill: rgba(32, 42, 56, 0.92);
  stroke: rgba(255, 193, 7, 0.75);
  stroke-width: 1.75;
}
.som-traj-badge-num {
  text-anchor: middle;
  font: 700 11px Inter, system-ui, sans-serif;
  fill: rgba(255, 248, 220, 0.95);
}
.som-traj-badge-now {
  text-anchor: middle;
  font: 600 8px Inter, system-ui, sans-serif;
  fill: rgba(255, 235, 59, 0.7);
  letter-spacing: 0.06em;
}
.som-traj-caption {
  position: relative;
  width: 100%;
  max-width: 56rem;
  margin: 0 auto 0.5rem;
  z-index: 6;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  background: rgba(10, 16, 26, 0.92);
  border: 1px solid rgba(107, 159, 212, 0.28);
  font-family: var(--mono);
  font-size: 0.6rem;
  line-height: 1.45;
  color: rgba(200, 210, 225, 0.92);
  pointer-events: none;
  backdrop-filter: blur(6px);
}
.som-traj-caption[hidden] {
  display: none !important;
}

.som-traj-caption .cap-past { color: rgba(255, 235, 59, 0.9); }
.som-traj-caption .cap-proj-up { color: rgba(0, 230, 118, 0.95); font-weight: 700; }
.som-traj-caption .cap-proj-down { color: rgba(255, 23, 68, 0.95); font-weight: 700; }
.som-traj-caption .cap-proj-neutral { color: rgba(144, 164, 174, 0.9); font-weight: 700; }
.som-traj-caption .cap-note { color: rgba(150, 165, 180, 0.75); font-size: 0.55rem; }
.som-traj-caption b { color: #e8f0fa; }
.som-traj-caption .cap-price {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.58rem;
}
.som-traj-caption .cap-price-up {
  color: #0a1f14;
  background: rgba(0, 230, 118, 0.92);
}
.som-traj-caption .cap-price-dn {
  color: #fff;
  background: rgba(255, 23, 68, 0.88);
}
.som-traj-caption .cap-price-neutral {
  color: #e8f0fa;
  background: rgba(144, 164, 174, 0.45);
}

/* Etichetta ↑ prezzo / ↓ prezzo sulla mappa (SVG) */
.som-traj-price-bg {
  fill: rgba(10, 16, 26, 0.92);
  stroke-width: 1.5;
}
.som-traj-price-up .som-traj-price-bg { stroke: rgba(0, 230, 118, 0.8); }
.som-traj-price-down .som-traj-price-bg,
.som-traj-price-dn .som-traj-price-bg { stroke: rgba(255, 23, 68, 0.8); }
.som-traj-price-neutral .som-traj-price-bg { stroke: rgba(144, 164, 174, 0.65); }
.som-traj-price-arrow {
  text-anchor: middle;
  font: 800 9px Inter, system-ui, sans-serif;
  letter-spacing: 0.03em;
}
.som-traj-price-up .som-traj-price-arrow { fill: rgba(0, 230, 118, 0.98); }
.som-traj-price-down .som-traj-price-arrow,
.som-traj-price-dn .som-traj-price-arrow { fill: rgba(255, 100, 120, 0.98); }
.som-traj-price-neutral .som-traj-price-arrow { fill: rgba(200, 210, 220, 0.95); }
.som-traj-price-pct {
  text-anchor: middle;
  font: 600 7px var(--mono), monospace;
  fill: rgba(200, 210, 225, 0.85);
}
.som-traj-price-arrow-sm {
  font-size: 8px;
}
.som-traj-price-bg-sm {
  stroke-width: 1.2;
}
.illogico-core-label {
  position: absolute;
  left: 50%;
  bottom: 3.1rem;
  transform: translateX(-50%);
  z-index: 2;
  text-align: center;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--emerald);
  text-transform: uppercase;
}
.illogico-core-sub {
  font-size: var(--text-sm);
  color: #b8c5d4;
  letter-spacing: 0.02em;
  margin-top: 0.25rem;
  text-transform: none;
}

.illogico-stats {
  position: absolute;
  bottom: 0.85rem;
  left: 0.85rem;
  right: 0.85rem;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
}
.illogico-stat {
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  background: rgba(40, 52, 66, 0.75);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.illogico-stat b {
  display: block;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--heading);
}
.illogico-stat span {
  font-size: var(--text-sm);
  color: #b8c5d4;
  letter-spacing: 0.02em;
}

.illogico-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 420px;
}

.illogico-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.illogico-filter {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}
.illogico-filter:hover,
.illogico-filter.active {
  color: var(--emerald);
  border-color: rgba(93, 191, 160, 0.4);
  background: var(--emerald-soft);
}

.illogico-signals {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 0.25rem;
}
.illogico-signals::-webkit-scrollbar { width: 4px; }
.illogico-signals::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.illogico-signal {
  display: grid;
  grid-template-columns: 72px 1fr auto auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--surface2), var(--surface));
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  text-align: left;
}
.illogico-signal:hover,
.illogico-signal.active {
  transform: translateX(4px);
  border-color: rgba(93, 191, 160, 0.35);
  box-shadow: 0 6px 20px rgba(10, 18, 30, 0.25);
}
.illogico-signal.signal-gold {
  border-color: rgba(212, 174, 114, 0.35);
  background: linear-gradient(135deg, rgba(212, 174, 114, 0.08), var(--surface));
}
.illogico-signal.signal-silver {
  border-color: rgba(107, 159, 212, 0.35);
  background: linear-gradient(135deg, rgba(107, 159, 212, 0.07), var(--surface));
}
.illogico-vmark {
  display: inline-block;
  margin-left: 0.2rem;
  font-size: 0.55rem;
  color: var(--gold);
  vertical-align: super;
}
.illogico-tier-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.6rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-right: 0.4rem;
  letter-spacing: 0.06em;
}
.illogico-tier-badge.tier-gold {
  background: rgba(212, 174, 114, 0.2);
  color: var(--gold);
  border: 1px solid rgba(212, 174, 114, 0.35);
}
.illogico-tier-badge.tier-silver {
  background: rgba(107, 159, 212, 0.15);
  color: var(--blue);
  border: 1px solid rgba(107, 159, 212, 0.3);
}
.illogico-sym { font-family: var(--mono); font-weight: 700; color: var(--gold); font-size: 0.82rem; }
.illogico-signal-name { font-size: var(--text-sm); color: #b8c5d4; display: block; }
.illogico-signal-pattern {
  font-size: var(--text-sm);
  color: var(--text);
}
.illogico-signal-action {
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.illogico-signal-action.long { background: var(--emerald-soft); color: var(--emerald); }
.illogico-signal-action.short { background: var(--red-soft); color: var(--red); }
.illogico-signal-action.exit { background: rgba(212, 174, 114, 0.18); color: var(--gold); }
.illogico-signal-action.avoid { background: rgba(120, 130, 150, 0.2); color: var(--muted); }
.illogico-signal-action.watch { background: rgba(107, 159, 212, 0.15); color: var(--blue); }
.illogico-signal-score {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--heading);
}

.illogico-detail {
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  background: linear-gradient(155deg, var(--surface2), var(--surface));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.illogico-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.illogico-detail-head h3 {
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--heading);
}
.illogico-detail-head h3 span { color: var(--gold); font-family: var(--mono); }
.illogico-detail-window {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--blue);
  text-align: right;
}
.illogico-detail-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0.65rem;
}
.illogico-equations {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(107, 159, 212, 0.08);
  border: 1px solid rgba(107, 159, 212, 0.15);
}
.illogico-equations code {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--blue);
  line-height: 1.5;
}
.illogico-factors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}
.illogico-factor {
  font-family: var(--mono);
  font-size: 0.6rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  background: rgba(107, 159, 212, 0.1);
  border: 1px solid rgba(107, 159, 212, 0.2);
  color: var(--blue);
}
.illogico-chart-block {
  margin: 0.85rem 0 1rem;
  padding: 0.65rem 0.7rem 0.75rem;
  border-radius: 10px;
  background: rgba(107, 159, 212, 0.04);
  border: 1px solid rgba(107, 159, 212, 0.18);
}
.illogico-chart-head {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #dce4ee;
  letter-spacing: 0.02em;
}
.illogico-chart-hint {
  margin: 0 0 0.5rem;
  font-size: 0.64rem;
  color: #8fa0b5;
  line-height: 1.4;
}
.illogico-chart-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface3);
  border: 1px solid var(--border);
  height: 100px;
}
#illogico-spark { width: 100%; height: 100px; display: block; }
.illogico-spark-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 0.4rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
}
.spark-leg-hist { color: #6b9fd4; }
.spark-leg-proj.up { color: var(--emerald); font-weight: 600; }
.spark-leg-proj.dn { color: var(--red); font-weight: 600; }
.illogico-detail-proj {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  margin-top: 0.55rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: rgba(0, 230, 118, 0.04);
  border: 1px solid rgba(0, 230, 118, 0.14);
  font-family: var(--mono);
  font-size: 0.72rem;
}
.illogico-detail-proj .up { color: var(--emerald); font-weight: 700; }
.illogico-detail-proj .dn { color: var(--red); font-weight: 700; }
.illogico-detail-proj .flat { color: #90A4AE; font-weight: 600; }
.illogico-detail-proj.is-flat {
  background: rgba(144, 164, 174, 0.06);
  border-color: rgba(144, 164, 174, 0.2);
}
.illogico-proj-flat-note {
  flex-basis: 100%;
  margin: 0.35rem 0 0;
  font-size: 0.62rem;
  color: #8fa0b5;
  line-height: 1.4;
}
.spark-leg-proj.flat { color: #90A4AE; font-weight: 600; }
.illogico-detail-proj-note {
  color: var(--muted);
  font-size: 0.62rem;
  margin-left: auto;
}
.illogico-topo-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 25%, rgba(107, 159, 212, 0.1) 50%, transparent 75%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.illogico-chart-wrap.reveal-topo .illogico-topo-layer { opacity: 1; }

.illogico-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.65rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.illogico-toggle input { accent-color: var(--emerald); }

.illogico-loading {
  text-align: center;
  padding: 2rem;
  color: #b8c5d4;
  font-size: var(--text-sm);
  font-size: 0.75rem;
}

/* Avanzamento analisi singolo titolo (Hub → Dettaglio) */
.analyze-progress {
  padding: 1.35rem 1.1rem 1.15rem;
  text-align: left;
}
.analyze-progress-head {
  font-size: 0.82rem;
  color: #dce4ee;
  margin-bottom: 0.65rem;
}
.analyze-progress-head strong {
  color: var(--emerald);
  font-family: var(--mono);
}
.analyze-progress-bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin-bottom: 0.45rem;
}
.analyze-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2e9e72, var(--emerald));
  transition: width 0.35s ease;
}
.analyze-progress-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  margin-bottom: 0.35rem;
}
.analyze-progress-pct { color: var(--emerald); font-weight: 700; }
.analyze-progress-eta { color: var(--muted); }
.analyze-progress-step {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: #8fa0b5;
  margin-bottom: 0.25rem;
}
.analyze-progress-msg {
  font-size: 0.72rem;
  color: #a8b6c8;
  line-height: 1.45;
  margin: 0;
}

.hub-analyze-progress {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(0, 230, 118, 0.05);
  border: 1px solid rgba(0, 230, 118, 0.18);
}
.hub-analyze-progress-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-rows: auto auto;
  gap: 0.2rem 0.55rem;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.62rem;
}
.hub-analyze-label { grid-column: 1 / -1; color: #c8d4e2; font-size: 0.68rem; }
.hub-analyze-label strong { color: var(--emerald); }
.hub-analyze-bar {
  grid-column: 1 / -1;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.hub-analyze-bar span {
  display: block;
  height: 100%;
  background: var(--emerald);
  transition: width 0.35s ease;
}
.hub-analyze-pct { color: var(--emerald); font-weight: 700; }
.hub-analyze-eta { color: var(--muted); }
.hub-analyze-msg { grid-column: 1 / -1; color: #8fa0b5; line-height: 1.35; }

.illogico-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
}
.illogico-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.3rem;
  vertical-align: middle;
}
.illogico-legend .lg-up { background: var(--emerald); }
.illogico-legend .lg-dn { background: var(--red); }
.illogico-legend .lg-topo { background: var(--blue); }

/* ── Esame Buscema ── */
.illogico-esame { margin-top: 1.25rem; }
.buscema-exam-grid {
  padding: 1.2rem 1.25rem;
  border-radius: var(--radius);
}
.buscema-exam-grid.card-3d::before { border-radius: var(--radius); }
.buscema-exam-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.buscema-kicker {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--emerald);
  letter-spacing: 0.06em;
}
.buscema-exam-head h3 {
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--heading);
  margin: 0.25rem 0 0.35rem;
}
.buscema-sym { color: var(--gold); }
.buscema-sub {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 36rem;
}
.buscema-sub b { color: var(--blue); }
.buscema-fidelity-badge {
  text-align: center;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(93, 191, 160, 0.12), rgba(107, 159, 212, 0.1));
  border: 1px solid rgba(93, 191, 160, 0.25);
  min-width: 7.5rem;
}
.buscema-fidelity-badge b {
  display: block;
  font-family: var(--display);
  font-size: 1.65rem;
  color: var(--emerald);
  line-height: 1.1;
}
.buscema-fidelity-badge span {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.buscema-fidelity-badge small {
  display: block;
  font-family: var(--mono);
  font-size: 0.52rem;
  color: var(--blue);
  margin-top: 0.25rem;
}
.buscema-verdict {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}
.buscema-verdict-label {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--muted);
  text-transform: uppercase;
}
.buscema-verdict strong {
  font-family: var(--display);
  font-size: 0.95rem;
}
.buscema-verdict.verdict-long {
  background: var(--emerald-soft);
  border-color: rgba(93, 191, 160, 0.35);
}
.buscema-verdict.verdict-long strong { color: var(--emerald); }
.buscema-verdict.verdict-short {
  background: var(--red-soft);
  border-color: rgba(220, 100, 100, 0.3);
}
.buscema-verdict.verdict-short strong { color: var(--red); }
.buscema-verdict.verdict-exit {
  background: rgba(120, 130, 150, 0.12);
}
.buscema-verdict.verdict-exit strong { color: var(--muted); }
.buscema-verdict.verdict-watch {
  background: rgba(212, 174, 114, 0.1);
  border-color: rgba(212, 174, 114, 0.25);
}
.buscema-verdict.verdict-watch strong { color: var(--gold); }
.buscema-map-kpis {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.buscema-map-kpis > div {
  padding: 0.5rem 0.4rem;
  border-radius: 8px;
  background: var(--surface3);
  border: 1px solid var(--border);
  text-align: center;
}
.buscema-map-kpis b {
  display: block;
  font-family: var(--mono);
  font-size: 0.52rem;
  color: var(--muted);
  margin-bottom: 0.15rem;
}
.buscema-map-kpis span {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--heading);
  font-weight: 600;
}
.buscema-map-kpis small {
  display: block;
  font-size: 0.48rem;
  color: var(--muted);
  margin-top: 0.2rem;
  line-height: 1.3;
}
.buscema-map-kpis .te-good span { color: var(--emerald); }
.buscema-map-kpis .te-warn span { color: var(--red); }
.buscema-map-kpis .te-mid span { color: var(--gold); }
.buscema-eq-wrap h4,
.buscema-consigli h4 {
  font-family: var(--display);
  font-size: 0.88rem;
  color: var(--heading);
  margin-bottom: 0.55rem;
}
.buscema-eq-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
}
.buscema-eq-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.65rem;
}
.buscema-eq-table th,
.buscema-eq-table td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.buscema-eq-table th {
  background: var(--surface3);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.58rem;
  text-transform: uppercase;
}
.buscema-eq-table tr.eq-ok td.eq-status { color: var(--emerald); }
.buscema-eq-table tr.eq-miss td.eq-status { color: var(--gold); }
.buscema-eq-table .eq-id {
  color: var(--gold);
  font-weight: 700;
  width: 2rem;
}
.buscema-eq-table .eq-latex code {
  color: var(--blue);
  font-size: 0.6rem;
  line-height: 1.4;
}
.buscema-eq-table .eq-val {
  color: var(--emerald);
  font-weight: 600;
  white-space: nowrap;
}
.buscema-eq-note {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  border-left: 2px solid var(--blue);
  padding-left: 0.55rem;
}
.buscema-consigli-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}
.buscema-consigli-block {
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
}
.buscema-consigli-block h5 {
  font-family: var(--mono);
  font-size: 0.62rem;
  margin-bottom: 0.45rem;
  color: var(--heading);
}
.buscema-consigli-block.tips { border-color: rgba(93, 191, 160, 0.25); }
.buscema-consigli-block.tips h5 { color: var(--emerald); }
.buscema-consigli-block.warnings { border-color: rgba(220, 100, 100, 0.25); }
.buscema-consigli-block.warnings h5 { color: var(--red); }
.buscema-consigli-block.deepen { border-color: rgba(107, 159, 212, 0.25); }
.buscema-consigli-block.deepen h5 { color: var(--blue); }
.buscema-consigli-block ul {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.55;
}
.buscema-exam-foot {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.buscema-exam-foot p {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.5;
}

.illogico-tracci { margin-top: 1.25rem; }
.illogico-tracci-grid {
  padding: 1.15rem;
  border-radius: var(--radius);
}
.illogico-tracci-grid.card-3d::before { border-radius: var(--radius); }
.illogico-tracci-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.illogico-tracci-head h3 {
  font-family: var(--display);
  font-size: 1rem;
  color: var(--heading);
}
.illogico-tracci-conf {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--gold);
  white-space: nowrap;
}
.illogico-tracci-formula {
  margin-bottom: 0.65rem;
}
.illogico-tracci-formula code {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--blue);
}
.illogico-tracci-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}
.illogico-tracci-metrics div {
  padding: 0.45rem;
  border-radius: 8px;
  background: var(--surface3);
  border: 1px solid var(--border);
  text-align: center;
}
.illogico-tracci-metrics b {
  display: block;
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--blue);
  margin-bottom: 0.15rem;
}
.illogico-tracci-metrics span {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--heading);
}
.illogico-proj-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.illogico-proj-cell {
  text-align: center;
  padding: 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
}
.illogico-proj-cell span {
  display: block;
  font-family: var(--mono);
  font-size: 0.55rem;
  color: var(--muted);
}
.illogico-proj-cell b {
  font-family: var(--display);
  font-size: 1.1rem;
}
.illogico-proj-cell.up b { color: var(--emerald); }
.illogico-proj-cell.dn b { color: var(--red); }
.illogico-cross {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.62rem;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  background: rgba(120, 130, 150, 0.15);
  color: var(--muted);
}
.illogico-cross.cross-ok {
  background: var(--emerald-soft);
  color: var(--emerald);
}
.illogico-cross.cross-warn {
  background: var(--red-soft);
  color: var(--red);
}
.illogico-traj-canvas {
  width: 100%;
  display: block;
  border-radius: 8px;
  background: var(--surface3);
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
}
.illogico-tracci-note {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
}
.tracci-history-wrap { margin: 0.75rem 0; }
.tracci-history-wrap h4 {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.tracci-history-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.6rem;
}
.tracci-history-table th,
.tracci-history-table td {
  padding: 0.3rem 0.45rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.tracci-history-table th { color: var(--muted); }

.illogico-verify {
  margin-top: 2rem;
  scroll-margin-top: calc(var(--nav-offset) + 2rem);
}
.illogico-verify-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.5rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 2px solid rgba(93, 191, 160, 0.3) !important;
}
.illogico-verify-grid.card-3d::before { border-radius: var(--radius); }
.illogico-verify-summary h3 {
  font-family: var(--font);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.5rem;
}
.illogico-verify-meta {
  font-size: var(--text-sm);
  color: #b8c5d4;
  line-height: 1.55;
  margin-bottom: 1rem;
}
.illogico-verify-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.illogico-verify-kpis div {
  padding: 0.75rem 0.5rem;
  border-radius: 10px;
  background: var(--surface3);
  border: 1px solid var(--border);
  text-align: center;
}
.illogico-verify-kpis b {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--emerald);
}
.illogico-verify-kpis span {
  font-size: var(--text-sm);
  color: #b8c5d4;
}
.illogico-disclaimer {
  font-size: var(--text-sm);
  color: #b8c5d4;
  line-height: 1.55;
  border-left: 3px solid var(--gold);
  padding-left: 0.75rem;
}
.illogico-verify-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.illogico-verify-table th,
.illogico-verify-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.illogico-verify-table th { color: var(--muted); font-weight: 600; }
.illogico-verify-table tr.row-verified td:first-child { color: var(--emerald); }
.hit-good { color: var(--emerald); font-weight: 700; }
.hit-mid { color: var(--gold); font-weight: 600; }
.hit-low { color: var(--red); }
.illogico-top-events {
  margin-top: 0.85rem;
  font-size: var(--text-sm);
  color: #b8c5d4;
  line-height: 1.65;
  padding-left: 1.1rem;
}
.illogico-top-events b { color: var(--gold); }
.illogico-vbadge {
  display: block;
  font-size: 0.55rem;
  color: var(--blue);
  margin-top: 0.15rem;
}
.illogico-verify-line {
  font-size: 0.78rem;
  color: var(--blue);
  margin-bottom: 0.65rem;
  font-family: var(--mono);
}

@media (max-width: 900px) {
  .edu-grid { grid-template-columns: 1fr; }
  .illogico-how-grid { grid-template-columns: 1fr 1fr; }
  .backtest-hero-kpis { grid-template-columns: repeat(2, 1fr); }
  .focus-split { grid-template-columns: 1fr; }
  .illogico-viz-hero { min-height: 62vh !important; }
  .illogico-radar-focus .radar-grid { grid-template-columns: 1fr; }

}

@media (max-width: 900px) {
  .hub-stats { grid-template-columns: repeat(2, 1fr); }
  .hub-filter-cards { grid-template-columns: 1fr; }
  .hub-tabs { flex-direction: column; }
  .hub-tab { border-radius: 8px; border: 1px solid var(--border); }
  .fav-card-name { max-width: 6.5rem; }
  .fav-tbl-chart { width: 6.5rem; max-width: 6.5rem; }
  .fav-mini-badge { min-width: 2rem; font-size: 0.58rem; }
  .suite-filter-inner { flex-direction: column; align-items: stretch; }
  .suite-filter-link { margin-left: 0; }
  .som-legend-grid { grid-template-columns: 1fr; }
  .compare-grid { grid-template-columns: 1fr; }
  .compare-mid { order: -1; }
  .illogico-tools { grid-template-columns: 1fr; }
  .illogico-picks-row { grid-template-columns: 1fr; }
  .safe-grid { grid-template-columns: 1fr; }
  .very-kpis { grid-template-columns: repeat(2, 1fr); }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .target-kpis { grid-template-columns: repeat(2, 1fr); }
  .illogico-radar-focus .radar-grid,
  .radar-grid { grid-template-columns: 1fr; }
  .radar-row { grid-template-columns: 52px 1fr auto auto; }
  .radar-act { display: none; }
  .illogico-hero-row { grid-template-columns: 1fr; }
  .illogico-tracci-metrics { grid-template-columns: repeat(2, 1fr); }
  .buscema-map-kpis { grid-template-columns: repeat(3, 1fr); }
  .buscema-consigli-grid { grid-template-columns: 1fr; }
  .buscema-exam-head { flex-direction: column; }
  .illogico-how-grid { grid-template-columns: 1fr; }
  .backtest-hero-kpis { grid-template-columns: 1fr 1fr; }
  .illogico-verify-grid { grid-template-columns: 1fr; }
  .illogico-verify-kpis { grid-template-columns: repeat(2, 1fr); }
  .illogico-viz { min-height: 280px; }
  .illogico-viz-hero { min-height: 56vh !important; }
  .illogico-stats { grid-template-columns: repeat(4, 1fr); }
  .illogico-signal { grid-template-columns: 60px 1fr auto; }
  .illogico-signal-score { display: none; }
}

/* Area personale: titolo sotto menu+ticker fissi, senza sovrapposizione */
body.borsa-unlocked .illogico-hero,
html.borsa-has-session .illogico-hero {
  margin-top: var(--chrome-h);
  padding-top: clamp(1.5rem, 3.5vw, 2.25rem);
  scroll-margin-top: var(--chrome-h);
}

