/* Analityks v3 — modes + deep analysis + actions */

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html { scroll-behavior: smooth; }
body { font-feature-settings: 'ss01', 'cv11'; min-height: 100vh; }

::selection { background: rgba(132, 204, 22, 0.25); color: white; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

.view.hidden { display: none !important; }

/* Ticker tape */
.ticker-track { animation: ticker-scroll 80s linear infinite; will-change: transform; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-item { color: rgba(255,255,255,0.5); }
.ticker-item .sym { color: rgba(255,255,255,0.9); font-weight: 600; margin-right: 8px; }
.ticker-item .price { margin-right: 6px; color: rgba(255,255,255,0.75); }
.ticker-item .up { color: #22c55e; }
.ticker-item .down { color: #ef4444; }

/* Nav buttons — repartidos y con relación con la píldora de hover */
#nav-links { gap: 4px; }
.nav-btn {
  position: relative;
  z-index: 1;
  padding: 7px 15px;
  border-radius: 8px;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s ease;
  font-size: 12.5px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.nav-btn:hover { color: #fff; }
/* Píldora que sigue al cursor (efecto tipo ReactBits) — se anima con GSAP */
.nav-hover-pill {
  position: absolute;
  top: 50%;
  left: 0;
  height: 32px;
  transform: translateY(-50%);
  border-radius: 8px;
  background: rgba(163, 230, 53, 0.10);
  border: 1px solid rgba(163, 230, 53, 0.22);
  box-shadow: 0 0 18px rgba(163, 230, 53, 0.12), inset 0 0 12px rgba(163, 230, 53, 0.05);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}
/* Marca (logo) clicable */
#brand-home { background: none; border: none; cursor: pointer; padding: 0; }
.brand-mark { transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease; }
#brand-home:hover .brand-mark { transform: rotate(90deg); box-shadow: 0 0 16px rgba(255, 255, 255, 0.45); }
#brand-home:focus-visible { outline: 2px solid var(--lime, #a3e635); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { .brand-mark, #brand-home:hover .brand-mark { transition: none; transform: none; } }

/* Chips */
.chip {
  padding: 4px 10px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.chip:hover {
  color: white;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}

/* Mode switch */
.mode-switch {
  display: inline-flex;
  padding: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  gap: 2px;
}
.mode-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 7px;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: transparent;
}
.mode-opt:hover { color: white; background: rgba(255,255,255,0.04); }
.mode-opt.active {
  background: #ffffff;
  color: #0a0a0a;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.mode-opt.active .mode-hint { color: rgba(10,10,10,0.5); }
.mode-hint {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.06em;
  padding-left: 8px;
  border-left: 1px solid rgba(255,255,255,0.1);
}
.mode-opt.active .mode-hint { border-left-color: rgba(10,10,10,0.15); }
.mode-hint-pro { text-transform: uppercase; letter-spacing: 0.12em; }

/* Autocomplete */
.ac-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: center;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.15s ease;
}
.ac-item:last-child { border-bottom: none; }
.ac-item.active, .ac-item:hover { background: rgba(255,255,255,0.04); }
.ac-sym { font-family: 'Geist Mono', monospace; font-size: 12px; font-weight: 600; color: white; }
.ac-name { font-size: 13px; color: rgba(255,255,255,0.6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-tag { font-family: 'Geist Mono', monospace; font-size: 9px; color: rgba(255,255,255,0.35); letter-spacing: 0.15em; text-transform: uppercase; }
.ac-empty { padding: 20px; text-align: center; color: rgba(255,255,255,0.4); font-size: 13px; }
.ac-match { color: #a3e635; font-weight: 600; }

/* Feature strip */
.feature-cell { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 20px; }
.feature-icon { color: rgba(255,255,255,0.5); margin-bottom: 14px; }
.feature-title { font-size: 14px; font-weight: 500; color: white; margin-bottom: 6px; letter-spacing: -0.01em; }
.feature-desc { font-size: 12.5px; color: rgba(255,255,255,0.45); line-height: 1.55; }

/* Market movers */
.movers-tabs { position: relative; display: inline-flex; gap: 4px; padding: 3px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; }
.mv-tab { position: relative; z-index: 1; padding: 6px 12px; border-radius: 6px; font-size: 11px; color: rgba(255,255,255,0.55); background: transparent; border: none; cursor: pointer; transition: color 0.2s; letter-spacing: 0.02em; }
.mv-tab:hover { color: white; }
.mv-tab.active { color: white; background: transparent; }
.mv-tab-underline {
  position: absolute;
  top: 3px;
  left: 0;
  width: 0;
  height: calc(100% - 6px);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 0;
}

.mover-card {
  padding: 12px 14px;
  background: #0f0f0f;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.mover-card:hover { border-color: rgba(255,255,255,0.15); transform: translateY(-1px); }
.mc-sym { font-family: 'Geist Mono', monospace; font-size: 12px; font-weight: 600; color: white; letter-spacing: 0.02em; }
.mc-name { font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; font-family: 'Geist Mono', monospace; }
.mc-price { font-size: 13px; color: white; font-variant-numeric: tabular-nums; }
.mc-chg { font-size: 11px; font-variant-numeric: tabular-nums; }
.mc-chg.up { color: #4ade80; }
.mc-chg.down { color: #f87171; }
.mc-meta { font-family: 'Geist Mono', monospace; font-size: 10px; color: rgba(255,255,255,0.35); margin-top: 4px; }
.mc-spark { margin-top: 10px; height: 24px; }

/* Mover skeleton */
.mover-skeleton { cursor: default; pointer-events: none; }
.mover-skeleton:hover { transform: none; border-color: rgba(255,255,255,0.05); }
.sk-line { height: 10px; border-radius: 3px; background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.03) 75%); background-size: 200% 100%; animation: sk-shimmer 1.4s linear infinite; }
@keyframes sk-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Sectors grid */
.sector-tile {
  padding: 14px 14px 12px;
  background: #0f0f0f;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.sector-tile:hover { border-color: rgba(255,255,255,0.15); transform: translateY(-1px); }
.st-icon { color: rgba(255,255,255,0.6); margin-bottom: 8px; }
.st-name { font-size: 12px; color: white; font-weight: 500; }
.st-chg { font-family: 'Geist Mono', monospace; font-size: 11px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.st-chg.up { color: #4ade80; }
.st-chg.down { color: #f87171; }

/* Loading tasks */
.task-row { display: flex; align-items: center; gap: 8px; opacity: 0; transform: translateX(-6px); transition: all 0.3s ease; }
.task-row.show { opacity: 1; transform: translateX(0); }
.task-row.done { color: rgba(255,255,255,0.85); }
.task-row .task-icon { width: 12px; height: 12px; flex-shrink: 0; }
.task-row.done .task-icon { color: #84cc16; }

/* Depth bars */
.depth-bar { height: 4px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3)); border-radius: 1px; transition: width 0.3s ease; }
.depth-bar.up { background: linear-gradient(90deg, transparent, rgba(34,197,94,0.5)); }
.depth-bar.down { background: linear-gradient(90deg, transparent, rgba(239,68,68,0.5)); }

/* Results tabs */
.results-tabs { display: flex; gap: 2px; padding: 4px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; width: fit-content; }
.rt-btn { padding: 8px 14px; border-radius: 7px; font-size: 12px; color: rgba(255,255,255,0.55); background: transparent; border: none; cursor: pointer; transition: all 0.2s; }
.rt-btn:hover { color: white; }
.rt-btn.active { background: rgba(255,255,255,0.08); color: white; }

/* Verdict cards */
.verdict-card { background: #0f0f0f; border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 18px 20px; position: relative; }
.verdict-card .v-label { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.4); }
.verdict-card .v-sub { margin-top: 6px; font-size: 12px; color: rgba(255,255,255,0.5); }

/* Action buttons */
.action-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  cursor: pointer;
}
.action-btn:hover { color: white; background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); }
.action-btn.active { background: rgba(132,204,22,0.12); color: #a3e635; border-color: rgba(132,204,22,0.3); }

/* Panels */
.panel { background: #0f0f0f; border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 24px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.panel-title { font-size: 14px; font-weight: 500; color: white; margin-bottom: 4px; letter-spacing: -0.01em; }
.panel-sub { font-size: 11px; color: rgba(255,255,255,0.4); font-family: 'Geist Mono', monospace; letter-spacing: 0.02em; }

.firm-tag { padding: 3px 8px; border-radius: 4px; font-family: 'Geist Mono', monospace; font-size: 10px; font-weight: 700; background: rgba(255,255,255,0.06); color: white; letter-spacing: 0.05em; }
.firm-tag.ms { background: rgba(59,130,246,0.15); color: #60a5fa; }
.firm-tag.arxe { background: rgba(168,85,247,0.15); color: #c084fc; }

/* Fundamental cards */
.fund-item { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); border-radius: 8px; padding: 14px 16px; }
.fund-item .fi-k { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.15em; color: rgba(255,255,255,0.4); text-transform: uppercase; margin-bottom: 8px; }
.fund-item .fi-v { font-family: 'Geist Mono', monospace; font-size: 17px; font-weight: 500; color: white; margin-bottom: 4px; }
.fund-item .fi-note { font-size: 11.5px; color: rgba(255,255,255,0.5); line-height: 1.5; }
.fund-item.wide { grid-column: span 2; }

.quote-block { background: rgba(255,255,255,0.02); border-left: 2px solid rgba(255,255,255,0.2); border-radius: 4px; padding: 14px 18px; }
.quote-block .q-label { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.15em; color: rgba(255,255,255,0.4); text-transform: uppercase; margin-bottom: 8px; }
.quote-block p { font-size: 13.5px; color: rgba(255,255,255,0.7); line-height: 1.65; }

/* Trade setup */
.trade-setup { background: rgba(59,130,246,0.04); border: 1px solid rgba(59,130,246,0.15); border-radius: 8px; padding: 16px 18px; }
.ts-title { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.18em; color: #60a5fa; text-transform: uppercase; margin-bottom: 12px; }
.ts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ts-k { font-family: 'Geist Mono', monospace; font-size: 10px; color: rgba(255,255,255,0.4); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 3px; }
.ts-v { font-family: 'Geist Mono', monospace; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* Technical rows */
.tech-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 6px; transition: background 0.2s ease; }
.tech-row:hover { background: rgba(255,255,255,0.02); }
.tech-row .tr-k { font-family: 'Geist Mono', monospace; font-size: 10px; color: rgba(255,255,255,0.4); letter-spacing: 0.12em; text-transform: uppercase; }
.tech-row .tr-v { font-size: 12.5px; color: rgba(255,255,255,0.85); font-family: 'Geist Mono', monospace; }
.tech-row .tr-tag { font-family: 'Geist Mono', monospace; font-size: 9px; padding: 3px 8px; border-radius: 4px; letter-spacing: 0.1em; font-weight: 600; }
.tag-bull { background: rgba(34,197,94,0.12); color: #4ade80; }
.tag-bear { background: rgba(239,68,68,0.12); color: #f87171; }
.tag-neut { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.55); }

/* Sector snapshot */
.sector-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 12.5px; }
.sector-row .k { font-family: 'Geist Mono', monospace; font-size: 10px; color: rgba(255,255,255,0.4); letter-spacing: 0.12em; text-transform: uppercase; }
.sector-row .v { color: white; font-family: 'Geist Mono', monospace; font-variant-numeric: tabular-nums; }

.peer-card { padding: 10px 12px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); border-radius: 6px; display: flex; justify-content: space-between; align-items: center; font-family: 'Geist Mono', monospace; font-size: 11.5px; }
.peer-card .p-sym { color: white; font-weight: 500; }
.peer-card .p-chg.up { color: #4ade80; }
.peer-card .p-chg.down { color: #f87171; }

/* News */
.news-row { display: grid; grid-template-columns: 60px 1fr auto; gap: 16px; align-items: center; padding: 14px 4px; cursor: pointer; transition: background 0.2s ease; }
.news-row:hover { background: rgba(255,255,255,0.02); }
.news-row .n-time { font-family: 'Geist Mono', monospace; font-size: 10px; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.1em; }
.news-row .n-title { font-size: 13px; color: white; line-height: 1.5; font-weight: 400; }
.news-row .n-source { font-family: 'Geist Mono', monospace; font-size: 10px; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 3px; }
.news-row .n-dot { width: 8px; height: 8px; border-radius: 50%; }
.news-row .n-dot.pos { background: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.5); }
.news-row .n-dot.neu { background: rgba(255,255,255,0.4); }
.news-row .n-dot.neg { background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,0.5); }
.news-row.has-link .n-ext { color: rgba(255,255,255,0.25); transition: color 0.2s; }
.news-row.has-link:hover .n-ext { color: #a3e635; }
.news-row.has-link:hover .n-title { color: #a3e635; }

/* Rec dots */
.rec-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.1); transition: all 0.4s ease; }
.rec-dot.on { background: #84cc16; box-shadow: 0 0 6px rgba(132,204,22,0.5); }

/* Verdict colors */
.v-buy { color: #4ade80; }
.v-hold { color: #fbbf24; }
.v-sell { color: #f87171; }

/* Goldman Sachs rating box */
.gs-rating-box {
  background: linear-gradient(135deg, rgba(212,175,55,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 10px;
  padding: 20px 24px;
}
.rb-k { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.2em; color: rgba(255,255,255,0.5); text-transform: uppercase; margin-bottom: 6px; }
.rb-v { font-family: 'Geist Mono', monospace; font-size: 20px; font-weight: 600; color: white; font-variant-numeric: tabular-nums; }

.gs-section {
  padding: 18px 20px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 8px;
}
.gs-section .gs-title {
  display: flex; align-items: baseline; gap: 12px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.gs-section .gs-num {
  color: rgba(212,175,55,0.8);
  font-weight: 700;
}
.gs-section .gs-body {
  font-size: 13.5px;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
}
.gs-section .gs-body p { margin-bottom: 8px; }
.gs-section .gs-body p:last-child { margin-bottom: 0; }
.gs-section .gs-body strong { color: white; font-weight: 500; }
.gs-section .gs-body ul { list-style: none; padding: 0; margin: 8px 0; }
.gs-section .gs-body li {
  padding: 6px 0 6px 20px;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.gs-section .gs-body li:last-child { border-bottom: none; }
.gs-section .gs-body li::before {
  content: '›';
  position: absolute;
  left: 4px;
  color: rgba(212,175,55,0.6);
}
.gs-section .gs-body .kv {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 4px 0;
}
.gs-section .gs-body .kv .kv-k { color: rgba(255,255,255,0.55); }
.gs-section .gs-body .kv .kv-v { color: white; font-family: 'Geist Mono', monospace; font-variant-numeric: tabular-nums; }

/* MS technical deep grid */
.ms-item {
  padding: 14px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 8px;
}
.ms-item .ms-k { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.15em; color: rgba(96,165,250,0.7); text-transform: uppercase; margin-bottom: 8px; }
.ms-item .ms-v { font-size: 13px; color: white; line-height: 1.55; margin-bottom: 6px; }
.ms-item .ms-note { font-size: 11.5px; color: rgba(255,255,255,0.5); line-height: 1.5; }
.ms-item .ms-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-family: 'Geist Mono', monospace; font-size: 9px; letter-spacing: 0.1em; font-weight: 600; margin-top: 6px; }

/* ARXE blocks */
.arxe-block {
  padding: 24px 0 28px;
  border-top: 1px solid rgba(168,85,247,0.15);
  position: relative;
}
.arxe-block:first-of-type { border-top: none; padding-top: 8px; }
.arxe-block.last { border-bottom: none; }
.ab-num {
  display: inline-block;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #c084fc;
  padding: 3px 8px;
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 4px;
  margin-bottom: 12px;
}
.ab-title {
  font-family: 'Geist', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: white;
  letter-spacing: -0.01em;
}
.arxe-verdict {
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(168,85,247,0.06), rgba(255,255,255,0.01));
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: 8px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.85);
  line-height: 1.65;
}
.arxe-verdict strong {
  color: #c084fc;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.arxe-kv {
  padding: 14px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 8px;
}
.arxe-kv .k { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.15em; color: rgba(255,255,255,0.45); text-transform: uppercase; margin-bottom: 6px; }
.arxe-kv .v { font-family: 'Geist Mono', monospace; font-size: 16px; color: white; font-variant-numeric: tabular-nums; }
.arxe-kv .n { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 4px; }

/* ARXE radiography rows */
.arxe-rad-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  align-items: baseline;
}
.arxe-rad-row:last-child { border-bottom: none; }
.arxe-rad-row .rr-k { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.15em; color: rgba(255,255,255,0.4); text-transform: uppercase; }
.arxe-rad-row .rr-v { font-size: 13px; color: rgba(255,255,255,0.85); line-height: 1.55; }

/* ARXE driver bar */
.arxe-driver {
  padding: 14px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 8px;
}
.arxe-driver .ad-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.arxe-driver .ad-cat { font-family: 'Geist Mono', monospace; font-size: 9px; letter-spacing: 0.18em; color: #c084fc; text-transform: uppercase; padding: 2px 8px; background: rgba(168,85,247,0.1); border-radius: 4px; }
.arxe-driver .ad-title { font-size: 13.5px; color: white; font-weight: 500; margin-top: 4px; }
.arxe-driver .ad-impact { font-family: 'Geist Mono', monospace; font-size: 12px; color: #a3e635; font-variant-numeric: tabular-nums; }
.arxe-driver .ad-body { font-size: 12.5px; color: rgba(255,255,255,0.6); line-height: 1.55; margin-top: 6px; }
.arxe-driver .ad-bar { margin-top: 10px; height: 3px; background: rgba(255,255,255,0.04); border-radius: 2px; overflow: hidden; }
.arxe-driver .ad-bar-fill { height: 100%; background: linear-gradient(90deg, #c084fc, #a3e635); border-radius: 2px; }

/* Porter force card */
.porter-force {
  padding: 14px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 8px;
}
.porter-force .pf-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.porter-force .pf-name { font-size: 12.5px; color: white; font-weight: 500; }
.porter-force .pf-score { font-family: 'Geist Mono', monospace; font-size: 14px; font-weight: 600; color: #c084fc; font-variant-numeric: tabular-nums; }
.porter-force .pf-body { font-size: 12px; color: rgba(255,255,255,0.55); line-height: 1.5; margin-top: 6px; }
.porter-force .pf-bar { margin-top: 10px; height: 3px; background: rgba(255,255,255,0.04); border-radius: 2px; overflow: hidden; }
.porter-force .pf-bar-fill { height: 100%; background: linear-gradient(90deg, rgba(168,85,247,0.4), #c084fc); border-radius: 2px; }

/* Competitive map */
.comp-group { }
.comp-group .cg-label { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.15em; color: rgba(255,255,255,0.5); text-transform: uppercase; margin-bottom: 10px; }
.comp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.comp-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 6px;
}
.comp-item .ci-sym { font-family: 'Geist Mono', monospace; font-size: 12px; font-weight: 600; color: white; }
.comp-item .ci-name { font-size: 11.5px; color: rgba(255,255,255,0.55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comp-item .ci-share { font-family: 'Geist Mono', monospace; font-size: 11px; color: #a3e635; font-variant-numeric: tabular-nums; }
.bottleneck-tag { font-family: 'Geist Mono', monospace; font-size: 9px; letter-spacing: 0.15em; padding: 2px 6px; border-radius: 4px; background: rgba(212,175,55,0.15); color: #d4af37; margin-left: 6px; }

/* Projection scenarios */
.scen-card {
  padding: 16px 18px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 8px;
}
.scen-card.bull { border-color: rgba(34,197,94,0.2); background: rgba(34,197,94,0.03); }
.scen-card.base { border-color: rgba(255,255,255,0.08); }
.scen-card.bear { border-color: rgba(239,68,68,0.2); background: rgba(239,68,68,0.03); }
.scen-card .sc-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.scen-card .sc-name { display: flex; align-items: center; gap: 8px; font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; }
.scen-card.bull .sc-name { color: #4ade80; }
.scen-card.base .sc-name { color: rgba(255,255,255,0.7); }
.scen-card.bear .sc-name { color: #f87171; }
.scen-card .sc-prob { font-family: 'Geist Mono', monospace; font-size: 11px; color: rgba(255,255,255,0.6); font-variant-numeric: tabular-nums; }
.scen-card .sc-num { font-family: 'Geist Mono', monospace; font-size: 18px; color: white; font-weight: 600; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.scen-card .sc-body { font-size: 12px; color: rgba(255,255,255,0.6); line-height: 1.55; }

/* Investment vehicles */
.vehicle-group { }
.vehicle-group .vg-label { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.15em; color: rgba(255,255,255,0.5); text-transform: uppercase; margin-bottom: 10px; }
.vehicle-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.vehicle-item {
  padding: 12px 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 6px;
}
.vehicle-item .vi-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.vehicle-item .vi-sym { font-family: 'Geist Mono', monospace; font-size: 12px; font-weight: 600; color: white; }
.vehicle-item .vi-cat { font-family: 'Geist Mono', monospace; font-size: 9px; letter-spacing: 0.1em; color: rgba(255,255,255,0.4); text-transform: uppercase; padding: 2px 6px; background: rgba(255,255,255,0.04); border-radius: 3px; }
.vehicle-item .vi-name { font-size: 11.5px; color: rgba(255,255,255,0.65); margin-bottom: 6px; }
.vehicle-item .vi-meta { font-family: 'Geist Mono', monospace; font-size: 10px; color: rgba(255,255,255,0.45); font-variant-numeric: tabular-nums; }

/* Plan action */
.plan-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 6px;
  align-items: baseline;
}
.plan-item .pi-num { font-family: 'Geist Mono', monospace; font-size: 12px; color: #c084fc; font-weight: 600; }
.plan-item .pi-body { font-size: 12.5px; color: rgba(255,255,255,0.75); line-height: 1.55; }
.plan-item .pi-body strong { color: white; font-weight: 500; }

/* Command palette */
.cmd-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.cmd-item:hover, .cmd-item.active { background: rgba(255,255,255,0.04); }
.cmd-item .cmd-sym { font-family: 'Geist Mono', monospace; font-size: 12px; font-weight: 600; color: white; }
.cmd-item .cmd-name { font-size: 13px; color: rgba(255,255,255,0.6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-item .cmd-tag { font-family: 'Geist Mono', monospace; font-size: 9px; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.1em; }

/* Entrance animations — always visible, animation is opt-in via JS */
[data-anim="fade-up"] {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-anim="fade-up"].anim-pending {
  opacity: 0;
  transform: translateY(20px);
}

/* Deep-only visibility (only for tab panels & UI markers, NOT for the mode selector cards) */
.deep-only { display: none; }
body[data-mode="deep"] .deep-only { display: block; }
body[data-mode="deep"] .tab-panel[data-mode="quick"] { display: none !important; }
body[data-mode="quick"] .tab-panel[data-mode="deep"] { display: none !important; }

/* Tab visibility */
.tab-panel[data-hidden="true"] { display: none; }

/* ================= ANIMATED BACKGROUND STACK ================= */
.bg-stack {
  position: fixed;
  inset: 0;
  z-index: -10;
  pointer-events: none;
  overflow: hidden;
}

/* Gradient orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.28;
  will-change: transform;
  mix-blend-mode: screen;
}
.orb-1 {
  width: 620px; height: 620px;
  background: radial-gradient(circle, #84cc16 0%, transparent 70%);
  top: -80px; left: -100px;
  animation: orb-drift-1 32s ease-in-out infinite;
}
.orb-2 {
  width: 720px; height: 720px;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  top: 20%; right: -180px;
  animation: orb-drift-2 38s ease-in-out infinite;
}
.orb-3 {
  width: 540px; height: 540px;
  background: radial-gradient(circle, #a855f7 0%, transparent 70%);
  bottom: 10%; left: 20%;
  animation: orb-drift-3 42s ease-in-out infinite;
}
.orb-4 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, #22c55e 0%, transparent 70%);
  bottom: -100px; right: 20%;
  animation: orb-drift-4 36s ease-in-out infinite;
}
@keyframes orb-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(180px, 220px) scale(1.1); }
  66% { transform: translate(80px, 120px) scale(0.9); }
}
@keyframes orb-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-220px, 180px) scale(1.15); }
}
@keyframes orb-drift-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(200px, -160px) scale(1.1); }
}
@keyframes orb-drift-4 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-150px, -220px) scale(0.85); }
}

/* Ghost candles canvas */
#bg-candles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.7;
}

/* Financial data particles */
#bg-particles {
  position: absolute;
  inset: 0;
}
.bg-particle {
  position: absolute;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: 0.05em;
  white-space: nowrap;
  animation: particle-float linear forwards;
  will-change: transform, opacity;
}
.bg-particle.up { color: rgba(74, 222, 128, 0.28); }
.bg-particle.down { color: rgba(248, 113, 113, 0.28); }
@keyframes particle-float {
  0% { opacity: 0; transform: translateY(0); }
  15%, 85% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-80px); }
}

/* Dot grid */
.dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 100%);
}

/* Noise overlay */
.noise-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Top/bottom fade */
.bg-fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,10,0.6) 0%, transparent 20%, transparent 80%, rgba(10,10,10,0.8) 100%),
    radial-gradient(ellipse at 50% 100%, rgba(10,10,10,0.6), transparent 60%);
}

/* ================= MODE CARDS (BIG) ================= */
.mode-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: rgba(15, 15, 15, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  text-align: left;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}
.mode-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(132, 204, 22, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}
.mode-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
  background: rgba(20, 20, 20, 0.75);
}
.mode-card.active {
  border-color: rgba(132, 204, 22, 0.4);
  background: rgba(132, 204, 22, 0.04);
  box-shadow: 0 0 0 1px rgba(132, 204, 22, 0.2), 0 8px 24px rgba(132, 204, 22, 0.06);
}
.mode-card.active::before { opacity: 1; }
.mode-card[data-mode="deep"].active {
  border-color: rgba(168, 85, 247, 0.45);
  background: rgba(168, 85, 247, 0.05);
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.25), 0 8px 24px rgba(168, 85, 247, 0.08);
}
.mode-card[data-mode="deep"].active::before {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), transparent 60%);
  opacity: 1;
}

.mc-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
  transition: all 0.3s;
}
.mode-card.active .mc-icon {
  background: rgba(132, 204, 22, 0.15);
  color: #a3e635;
}
.mode-card[data-mode="deep"].active .mc-icon {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}
.mc-content { flex: 1; min-width: 0; }
.mc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.mc-title {
  font-size: 15px;
  font-weight: 500;
  color: white;
  letter-spacing: -0.01em;
}
.mc-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  letter-spacing: 0.1em;
  margin-left: 4px;
  vertical-align: middle;
}
.mc-time {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.mc-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.45;
}
.mc-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.25s;
}
.mode-card.active .mc-check {
  background: #a3e635;
  border-color: #a3e635;
  color: #0a0a0a;
}
.mode-card[data-mode="deep"].active .mc-check {
  background: #c084fc;
  border-color: #c084fc;
  color: #0a0a0a;
}

/* Hide old mode-switch */
.mode-switch { display: none; }

/* ================= SETTINGS MODAL ================= */
.setting-block {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}
.setting-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.setting-title {
  font-size: 14px;
  font-weight: 500;
  color: white;
  letter-spacing: -0.01em;
}
.setting-status {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.05em;
}
.setting-status.active {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}
.setting-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
  margin-bottom: 10px;
}
.setting-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  color: white;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  outline: none;
  transition: border-color 0.2s;
}
.setting-input:focus { border-color: rgba(132, 204, 22, 0.4); }
.setting-input::placeholder { color: rgba(255, 255, 255, 0.2); }
.setting-hint {
  margin-top: 6px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
}
.setting-link { color: rgba(132, 204, 22, 0.75); }

/* Settings button API indicator */
#settings-btn { position: relative; }
#settings-btn.has-keys::after {
  content: '';
  position: absolute;
  top: 6px; right: 6px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.7);
}

/* Sectors explorer */
.sector-nav-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.18s;
  text-align: left;
  margin-bottom: 2px;
}
.sector-nav-btn:hover { background: rgba(255,255,255,0.03); color: white; }
.sector-nav-btn.active { background: rgba(132,204,22,0.08); border-color: rgba(132,204,22,0.25); color: white; }
.sector-nav-btn .snb-name { font-size: 13px; font-weight: 500; }
.sector-nav-btn .snb-chg { font-family: 'Geist Mono', monospace; font-size: 11px; font-variant-numeric: tabular-nums; }
.sector-nav-btn .snb-chg.up { color: #4ade80; }
.sector-nav-btn .snb-chg.down { color: #f87171; }

.sector-detail-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.sector-detail-title { font-family: 'Geist', sans-serif; font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.sector-detail-desc { font-size: 12.5px; color: rgba(255,255,255,0.5); line-height: 1.5; margin-bottom: 20px; max-width: 620px; }
.sector-stocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.sector-stock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s;
}
.sector-stock:hover { border-color: rgba(255,255,255,0.18); background: rgba(255,255,255,0.04); transform: translateY(-1px); }
.sector-stock .ss-left .ss-sym { font-family: 'Geist Mono', monospace; font-size: 13px; font-weight: 600; color: white; }
.sector-stock .ss-left .ss-name { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.sector-stock .ss-right { text-align: right; font-family: 'Geist Mono', monospace; }
.sector-stock .ss-price { font-size: 12px; color: white; font-variant-numeric: tabular-nums; }
.sector-stock .ss-chg { font-size: 11px; font-variant-numeric: tabular-nums; margin-top: 2px; }
.sector-stock .ss-chg.up { color: #4ade80; }
.sector-stock .ss-chg.down { color: #f87171; }
.sector-stock .ss-chg.pending { color: rgba(255,255,255,0.3); }

/* ============ Mapa de mercado (treemap Finviz) ============ */
.sector-heatmap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #0b0b0e;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.hm-sector {
  position: absolute;
  pointer-events: none;
  outline: 1px solid rgba(10, 10, 12, 0.9);
}
.hm-sector-label {
  pointer-events: auto;
  cursor: pointer;
  height: 15px;
  line-height: 15px;
  padding: 0 5px;
  font-family: 'Geist Mono', monospace;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(12, 12, 15, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}
.hm-sector-label:hover { color: #fff; }
.hm-tile {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: pointer;
  overflow: hidden;
  color: #fff;
  line-height: 1.05;
  border: 1px solid rgba(10, 10, 12, 0.7);
  transition: filter 0.12s;
}
.hm-tile:hover { filter: brightness(1.3); z-index: 5; }
.hm-sym {
  font-family: 'Geist Mono', monospace;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.hm-chg {
  font-family: 'Geist Mono', monospace;
  font-size: 0.58em;
  font-weight: 500;
  opacity: 0.9;
  font-variant-numeric: tabular-nums;
}
.hm-leg {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 3px;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

/* ============ Chat con el analista ============ */
.chat-msg {
  max-width: 88%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.55;
  word-wrap: break-word;
}
.chat-user {
  margin-left: auto;
  background: rgba(192, 132, 252, 0.14);
  border: 1px solid rgba(192, 132, 252, 0.28);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-ai {
  margin-right: auto;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.88);
  border-bottom-left-radius: 4px;
}
.chat-ai p { margin: 0 0 6px; }
.chat-ai p:last-child { margin-bottom: 0; }
.chat-ai ul { margin: 4px 0; padding-left: 16px; list-style: disc; }
.chat-ai li { margin: 2px 0; }
.chat-ai strong { color: #d8b4fe; font-weight: 600; }
.chat-typing span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  margin-right: 4px;
  animation: chatBlink 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatBlink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.chat-chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.15s;
}
.chat-chip:hover { color: #fff; border-color: rgba(192, 132, 252, 0.4); }

/* Estados de carga / aviso reutilizables (screener IA + seguimiento de cartera) */
.cmp-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Geist Mono', monospace;
}
.cmp-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: #c084fc;
  border-radius: 50%;
  animation: cmpSpin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes cmpSpin { to { transform: rotate(360deg); } }
.cmp-verdict-note {
  margin-top: 14px;
  padding: 12px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  text-align: center;
}

.wl-item {
  display: grid;
  grid-template-columns: 1fr 110px auto auto 34px;
  align-items: center;
  gap: 18px;
  padding: 14px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.12s;
}
.wl-item:last-child { border-bottom: none; }
.wl-item:hover { background: rgba(255, 255, 255, 0.02); }
.wl-id { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.wl-sym { font-family: 'Geist Mono', monospace; font-size: 13px; font-weight: 700; color: #fff; }
.wl-name { font-size: 11.5px; color: rgba(255, 255, 255, 0.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-sparkcell { height: 30px; display: flex; align-items: center; }
.wl-spark { display: block; }
.wl-price { font-family: 'Geist Mono', monospace; font-size: 13px; color: rgba(255, 255, 255, 0.85); font-variant-numeric: tabular-nums; }
.wl-chg { font-family: 'Geist Mono', monospace; font-size: 12.5px; font-variant-numeric: tabular-nums; min-width: 68px; text-align: right; }
.wl-chg.up { color: #4ade80; }
.wl-chg.down { color: #f87171; }
.wl-chg.pending { color: rgba(255, 255, 255, 0.3); }
.wl-remove {
  color: rgba(255, 255, 255, 0.25);
  font-size: 17px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.12s;
}
.wl-remove:hover { color: #f87171; background: rgba(248, 113, 113, 0.08); }
@media (max-width: 640px) {
  .wl-item { grid-template-columns: 1fr auto auto 34px; }
  .wl-sparkcell { display: none; }
}
.wl-stat {
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.wl-stat-k {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}
.wl-stat-v {
  margin-top: 6px;
  font-family: 'Geist Mono', monospace;
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.wl-stat-v span { font-size: 13px; font-weight: 500; opacity: 0.85; margin-left: 4px; }
.wl-stat-v.up { color: #4ade80; }
.wl-stat-v.down { color: #f87171; }
.wl-empty { padding: 52px 20px; text-align: center; }
.wl-empty-star { font-size: 40px; color: rgba(255, 255, 255, 0.18); line-height: 1; }
.wl-empty-title { margin-top: 14px; font-family: 'Instrument Serif', serif; font-size: 24px; color: rgba(255, 255, 255, 0.85); }
.wl-empty-sub { margin-top: 8px; font-size: 12.5px; color: rgba(255, 255, 255, 0.4); max-width: 340px; margin-left: auto; margin-right: auto; line-height: 1.6; }
.wl-empty-cta {
  margin-top: 18px;
  padding: 9px 20px;
  border-radius: 9px;
  font-size: 12.5px;
  color: #0a0a0a;
  background: #fff;
  font-weight: 500;
  transition: all 0.15s;
}
.wl-empty-cta:hover { background: rgba(255, 255, 255, 0.88); }

/* ============ Micro-interacciones (hover lift/glow, halos) ============ */

/* Halo radial que se expande al seleccionar un modo */
.mode-card { position: relative; overflow: hidden; }
.mc-halo {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(132, 204, 22, 0.35) 0%, rgba(132, 204, 22, 0) 65%);
  pointer-events: none;
  transform: scale(0.3);
  opacity: 0;
}
.mode-card.active { box-shadow: 0 0 0 1px rgba(132, 204, 22, 0.25), 0 12px 40px rgba(132, 204, 22, 0.08); }

/* Hover lift + halo suave en las principales tarjetas clickeables */
.mover-card, .feature-cell, .scr-card, .sector-tile, .sector-nav-btn, .sector-stock {
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1),
              border-color 0.2s ease,
              background 0.2s ease,
              box-shadow 0.28s ease;
}
.mover-card:hover, .scr-card:hover, .sector-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.feature-cell { position: relative; }
.feature-cell::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 12px;
  background: radial-gradient(240px 120px at 50% 0%, rgba(132, 204, 22, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.feature-cell:hover::before { opacity: 1; }
.feature-cell:hover .feature-icon { color: #84cc16; transform: translateY(-2px); transition: all 0.25s ease; }

/* Botón Analizar — micro-pulse on hover */
#ticker-form button[type="submit"] {
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.25s ease;
}
#ticker-form button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(255, 255, 255, 0.12);
}
#ticker-form button[type="submit"]:active { transform: translateY(0); }

/* ============ Calendario de resultados ============ */
.cal-nav {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.15s;
}
.cal-nav:hover { color: #fff; background: rgba(255, 255, 255, 0.07); transform: translateY(-1px); }
.cal-today {
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.15s;
}
.cal-today:hover { color: #fff; border-color: rgba(132, 204, 22, 0.4); }
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 0 2px 8px;
}
.cal-weekdays span {
  text-align: center;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}
.cal-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-cell {
  position: relative;
  min-height: 92px;
  padding: 7px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.cal-cell.out { background: transparent; border-color: transparent; }
.cal-cell.has-ev {
  border-color: rgba(255, 255, 255, 0.09);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.cal-cell.has-ev:hover { border-color: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.03); transform: translateY(-1px); }
.cal-cell.has-ev:focus-visible { outline: 2px solid rgba(132, 204, 22, 0.6); outline-offset: 1px; }
.cal-cell.today {
  border-color: rgba(132, 204, 22, 0.5);
  box-shadow: inset 0 0 0 1px rgba(132, 204, 22, 0.2);
}
.cal-cell.selected {
  border-color: rgba(132, 204, 22, 0.7);
  background: rgba(132, 204, 22, 0.06);
  box-shadow: 0 0 0 1px rgba(132, 204, 22, 0.35);
}
/* Estado de carga del mes: LetterGlitch (ReactBits) sobre la estructura tenue del mes */
.cal-cell.skel { border-color: rgba(255, 255, 255, 0.035); }
.cal-cell.skel .cal-day { color: rgba(255, 255, 255, 0.16); }
.cal-glitchwrap {
  position: absolute; inset: 0;
  border-radius: 10px; overflow: hidden;
  pointer-events: none; z-index: 6;
}
.cal-glitch {
  display: block; width: 100%; height: 100%;
  opacity: 0.5;
  -webkit-mask: radial-gradient(125% 85% at 50% 50%, #000 42%, transparent 92%);
  mask: radial-gradient(125% 85% at 50% 50%, #000 42%, transparent 92%);
}
.cal-glitch-label {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 9px;
  padding: 9px 16px; border-radius: 10px;
  background: rgba(10, 10, 11, 0.72);
  border: 1px solid rgba(132, 204, 22, 0.25);
  backdrop-filter: blur(6px);
  font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
}
.cal-glitch-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #a3e635;
  box-shadow: 0 0 10px rgba(163, 230, 53, 0.85);
  animation: cal-glitch-pulse 1.1s ease-in-out infinite;
}
@keyframes cal-glitch-pulse { 0%, 100% { opacity: 0.4; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) {
  .cal-glitch { opacity: 0.32; }
  .cal-glitch-dot { animation: none; }
}

.cal-day {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-variant-numeric: tabular-nums;
}
.cal-cell.today .cal-day { color: #84cc16; font-weight: 700; }
.cal-ind { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 8px; }
.cal-chip {
  font-family: 'Geist Mono', monospace;
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.cal-chip.wl {
  color: #bef264;
  background: rgba(132, 204, 22, 0.12);
  border: 1px solid rgba(132, 204, 22, 0.28);
}
.cal-chip:not(.wl):not(.muted) {
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.cal-chip.muted { color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.03); padding: 2px 5px; }

/* Popover del día */
#cal-popover {
  position: absolute;
  z-index: 40;
  width: min(340px, 92vw);
  max-height: 380px;
  overflow-y: auto;
  background: #101012;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.cal-phead {
  position: sticky; top: 0;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 14px 16px 10px;
  background: #101012;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.cal-pdate { font-size: 14px; font-weight: 600; color: #fff; }
.cal-psub { font-size: 11px; color: rgba(255, 255, 255, 0.4); margin-top: 2px; font-family: 'Geist Mono', monospace; }
.cal-pclose { color: rgba(255, 255, 255, 0.4); font-size: 20px; line-height: 1; padding: 0 4px; cursor: pointer; transition: color 0.15s; }
.cal-pclose:hover { color: #fff; }
.cal-pbody { padding: 6px 8px 10px; }
.cal-psec {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  padding: 12px 8px 6px;
  display: flex; align-items: center; gap: 6px;
}
.cal-psec.wl { color: rgba(190, 242, 100, 0.8); }
.cal-psec.pre { color: rgba(250, 204, 21, 0.85); }
.cal-psec.after { color: rgba(129, 178, 252, 0.85); }
.cal-psec.na { color: rgba(255, 255, 255, 0.4); }
.cal-prow.in-wl { background: rgba(132, 204, 22, 0.06); }
.cal-prow.in-wl:hover { background: rgba(132, 204, 22, 0.1); }
.cal-wl-star { color: #84cc16; font-size: 9px; margin-left: 5px; vertical-align: middle; }
.cal-pcount {
  font-size: 9px; padding: 1px 5px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.55);
}
.cal-prow {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px; border-radius: 9px;
  cursor: pointer; text-align: left; transition: background 0.13s;
}
.cal-prow:hover { background: rgba(255, 255, 255, 0.04); }
.cal-logo {
  position: relative;
  width: 26px; height: 26px; flex-shrink: 0;
  border-radius: 6px; overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  display: flex; align-items: center; justify-content: center;
}
.cal-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.cal-mono { font-family: 'Geist Mono', monospace; font-size: 9px; font-weight: 700; color: rgba(255, 255, 255, 0.6); }
.cal-prow-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cal-prow-sym { font-family: 'Geist Mono', monospace; font-size: 12px; font-weight: 700; color: #fff; }
.cal-prow-name { font-size: 11px; color: rgba(255, 255, 255, 0.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-prow-eps { font-family: 'Geist Mono', monospace; font-size: 10px; color: rgba(255, 255, 255, 0.55); white-space: nowrap; }
@media (max-width: 720px) {
  .cal-cell { min-height: 66px; padding: 5px; }
  .cal-chip { font-size: 8px; padding: 1px 4px; }
  .cal-weekdays span { font-size: 8px; }
}

/* ============ Micro-interacciones (patrones ReactBits portados a CSS/JS puro) ============ */

/* ShinyText — barrido de brillo sutil sobre texto (badges) */
.shiny-text {
  background: linear-gradient(120deg, rgba(255,255,255,0.55) 40%, #ffffff 50%, rgba(255,255,255,0.55) 60%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine-sweep 5.5s linear infinite;
}
@keyframes shine-sweep { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* GlareHover / Spotlight — glow radial que sigue al cursor en tarjetas */
.spotlight { position: relative; }
.spotlight::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: radial-gradient(190px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.07), transparent 65%);
}
.spotlight:hover::after { opacity: 1; }

/* LogoLoop — la cinta de cotizaciones se pausa al pasar el cursor */
.ticker-track:hover { animation-play-state: paused; }

/* hero-word — unidad de revelado palabra a palabra (BlurText) */
.hero-word { display: inline-block; }

@media (prefers-reduced-motion: reduce) {
  .shiny-text { animation: none; background: none; color: inherit; }
  .spotlight::after { display: none; }
}

/* ============ Accesibilidad (auditoría DAFO) ============ */
/* Foco visible global — antes solo existía en el calendario; el resto dependía
   del anillo por defecto, casi invisible sobre #0a0a0a. */
:focus-visible { outline: 2px solid #a3e635; outline-offset: 2px; border-radius: 4px; }
.mover-card:focus-visible, .scr-card:focus-visible, .hm-tile:focus-visible,
.news-row:focus-visible, .mode-card:focus-visible { outline-offset: -2px; }

/* Placeholders con contraste AA (antes ~2:1) */
.setting-input::placeholder,
#ticker-input::placeholder,
#screener-input::placeholder { color: rgba(255, 255, 255, 0.42); }

/* Menos movimiento: detiene fondo animado, ticker, orbes y pulsos */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .orb, .orb-1, .orb-2, .orb-3, .orb-4 { animation: none; }
  .animate-slow-pulse { animation: none !important; opacity: 0.6; }
  #bg-particles { display: none; }
}

/* ============ Cartera (simulador de portfolio) ============ */
.pf-stat { background: #0f0f0f; border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 12px 16px; min-width: 132px; }
.pf-stat-k { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.45); }
.pf-stat-v { font-family: 'Geist Mono', monospace; font-size: 20px; font-weight: 600; margin-top: 6px; letter-spacing: -0.02em; }

/* Indicador "en directo" + sello de actualización (evolución diaria cada 20 min) */
.pf-live { display: inline-flex; align-items: center; gap: 7px; font-family: 'Geist Mono', monospace; font-size: 10.5px; letter-spacing: 0.06em; color: rgba(255,255,255,0.5); }
.pf-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px rgba(74,222,128,0.7); position: relative; flex-shrink: 0; }
.pf-live-dot::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid rgba(74,222,128,0.5); animation: pfLivePulse 2s ease-out infinite; }
@keyframes pfLivePulse { 0% { transform: scale(0.7); opacity: 0.9; } 100% { transform: scale(1.9); opacity: 0; } }
.pf-live-txt { color: rgba(255,255,255,0.6); text-transform: uppercase; }
.pf-live-time { color: rgba(255,255,255,0.4); }
@media (prefers-reduced-motion: reduce) { .pf-live-dot::after { animation: none; } }

/* Toggle % / $ */
.pf-toggle { display: inline-flex; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 9px; padding: 3px; gap: 2px; }
.pf-mode { font-size: 12px; padding: 6px 12px; border-radius: 7px; color: rgba(255,255,255,0.5); background: transparent; border: none; cursor: pointer; transition: all 0.15s; }
.pf-mode:hover { color: #fff; }
.pf-mode.active { background: #84cc16; color: #0a0a0a; font-weight: 600; }

/* Timeframe chips */
.pf-tfs { display: inline-flex; gap: 4px; }
.pf-tf { font-family: 'Geist Mono', monospace; font-size: 11px; padding: 5px 10px; border-radius: 7px; color: rgba(255,255,255,0.45); background: transparent; border: 1px solid transparent; cursor: pointer; transition: all 0.15s; }
.pf-tf:hover { color: #fff; background: rgba(255,255,255,0.04); }
.pf-tf.active { color: #a3e635; border-color: rgba(163,230,53,0.35); }

/* Gráfico */
.pf-chart { position: relative; width: 100%; min-height: 320px; }
.pf-chart svg { display: block; overflow: visible; }
.pf-chart-empty { display: flex; align-items: center; justify-content: center; height: 300px; color: rgba(255,255,255,0.35); font-size: 13px; }
.pf-tip { position: absolute; pointer-events: none; background: rgba(10,10,11,0.92); border: 1px solid rgba(132,204,22,0.3); border-radius: 8px; padding: 5px 9px; font-family: 'Geist Mono', monospace; font-size: 11px; color: #fff; white-space: nowrap; box-shadow: 0 6px 20px rgba(0,0,0,0.5); z-index: 5; }

/* Tabla de posiciones */
.pf-empty { padding: 40px 20px; text-align: center; color: rgba(255,255,255,0.4); font-size: 13px; }
.pf-hrow, .pf-row { display: grid; grid-template-columns: 1.7fr 0.7fr 0.9fr 0.9fr 1fr 1.2fr 1.1fr 34px; align-items: center; gap: 10px; padding: 11px 16px; }
.pf-hrow { font-family: 'Geist Mono', monospace; font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.4); border-bottom: 1px solid rgba(255,255,255,0.06); }
.pf-row { border-bottom: 1px solid rgba(255,255,255,0.04); cursor: pointer; transition: background 0.15s; }
.pf-row:last-child { border-bottom: none; }
.pf-row:hover { background: rgba(255,255,255,0.025); }
.pf-asset { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pf-logo { width: 26px; height: 26px; border-radius: 7px; background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; font-family: 'Geist Mono', monospace; font-size: 9px; color: rgba(255,255,255,0.7); flex: none; overflow: hidden; }
.pf-logo img { width: 100%; height: 100%; object-fit: contain; }
.pf-asset-id { min-width: 0; }
.pf-asset-sym { font-family: 'Geist Mono', monospace; font-size: 13px; font-weight: 700; }
.pf-asset-name { font-size: 11px; color: rgba(255,255,255,0.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-num { font-family: 'Geist Mono', monospace; font-size: 13px; font-variant-numeric: tabular-nums; }
.pf-sub { font-size: 10px; color: rgba(255,255,255,0.4); }
.pf-pl-pos { color: #4ade80; } .pf-pl-neg { color: #f87171; }
.pf-weight { display: flex; align-items: center; gap: 7px; }
.pf-weight-bar { flex: 1; height: 4px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; }
.pf-weight-fill { height: 100%; background: #84cc16; border-radius: 999px; }
.pf-sell { background: none; border: none; color: rgba(255,255,255,0.3); font-size: 15px; cursor: pointer; padding: 4px; border-radius: 6px; transition: all 0.15s; }
.pf-sell:hover { color: #f87171; background: rgba(239,68,68,0.1); }

/* Brief IA */
.pf-brief-card { background: rgba(132,204,22,0.03); border: 1px solid rgba(132,204,22,0.16); border-radius: 12px; padding: 16px 18px; }
.pf-brief-headline { font-size: 15px; font-weight: 600; color: #fff; line-height: 1.5; }
.pf-brief-sec { margin-top: 14px; }
.pf-brief-sec-k { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(163,230,53,0.8); margin-bottom: 6px; }
.pf-brief-line { font-size: 13px; color: rgba(255,255,255,0.75); line-height: 1.55; margin-top: 4px; }
.pf-brief-line b { color: #fff; font-family: 'Geist Mono', monospace; font-size: 12px; }
.pf-brief-note { font-size: 11px; color: rgba(255,255,255,0.35); margin-top: 12px; }

@media (max-width: 720px) {
  .pf-hrow, .pf-row { grid-template-columns: 1.5fr 0.8fr 1fr 1fr 30px; }
  .pf-col-avg, .pf-col-cur, .pf-col-weight { display: none; }
}

/* ============ ReactBits round 2 ============ */

/* StarBorder — botón oscuro con borde de luz lima que orbita (botón IA de cartera) */
@property --sbA { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.sb-btn {
  position: relative;
  padding: 1px; border: none; border-radius: 10px;
  background: conic-gradient(from var(--sbA), transparent 0%, transparent 72%, rgba(163,230,53,0.9) 86%, transparent 100%),
              rgba(163,230,53,0.18);
  animation: sb-rotate 3.2s linear infinite;
  cursor: pointer;
}
.sb-inner {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: 9px;
  background: #101012;
  color: #fff; font-size: 13px; font-weight: 600;
  transition: background 0.2s;
}
.sb-btn:hover .sb-inner { background: #16161a; }
@keyframes sb-rotate { to { --sbA: 360deg; } }

/* ClickSpark — chispas radiales en el punto de clic */
.click-spark { position: fixed; z-index: 200; pointer-events: none; width: 0; height: 0; }
.click-spark span {
  position: absolute; left: -1px; top: -18px;
  width: 2px; height: 10px; border-radius: 2px;
  background: #a3e635; transform-origin: 1px 18px;
}

/* Barras de peso de la cartera crecen al renderizar */
.pf-weight-fill { transform-origin: left center; animation: pf-grow 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes pf-grow { from { transform: scaleX(0); } }

@media (prefers-reduced-motion: reduce) {
  .sb-btn { animation: none; background: rgba(163,230,53,0.3); }
  .pf-weight-fill { animation: none; }
  .click-spark { display: none; }
}

/* ============ Nav móvil + toasts + alertas ============ */
.mnav {
  position: absolute; top: 100%; left: 0; right: 0;
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px 14px;
  background: rgba(10, 10, 11, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mnav.hidden { display: none; }
.mnav-item { text-align: left; padding: 11px 12px !important; font-size: 14px !important; border-radius: 8px; }

.toast {
  position: fixed; right: 18px; bottom: 18px; z-index: 300;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 15px; border-radius: 10px;
  background: rgba(16, 16, 18, 0.95);
  border: 1px solid rgba(163, 230, 53, 0.3);
  font-family: 'Geist Mono', monospace; font-size: 12px; color: #fff;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.55);
}

.alert-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  width: 210px; padding: 12px;
  background: #101012; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.6);
}
.alert-pop-k { font-family: 'Geist Mono', monospace; font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.45); margin-bottom: 7px; }
.alert-pop input {
  width: 100%; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 8px 10px; font-family: 'Geist Mono', monospace; font-size: 13px;
  color: #fff; outline: none;
}
.alert-pop input:focus { border-color: rgba(163, 230, 53, 0.5); }
.alert-pop-row { display: flex; gap: 6px; margin-top: 9px; }
.alert-pop-save { flex: 1; background: #84cc16; color: #0a0a0a; font-size: 12px; font-weight: 600; border: none; border-radius: 7px; padding: 7px; cursor: pointer; }
.alert-pop-cancel { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.6); font-size: 12px; border: none; border-radius: 7px; padding: 7px 10px; cursor: pointer; }
.action-btn.has-alert { color: #a3e635; border-color: rgba(163, 230, 53, 0.4); }

/* ============ Cuentas (Fase 1 SaaS): botón + modal ============ */
.auth-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 8px;
  background: rgba(163, 230, 53, 0.08); border: 1px solid rgba(163, 230, 53, 0.25);
  color: #d9f99d; font-size: 12px; font-weight: 500; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.auth-btn:hover { background: rgba(163, 230, 53, 0.14); border-color: rgba(163, 230, 53, 0.45); }
.auth-avatar {
  width: 18px; height: 18px; border-radius: 50%; background: #84cc16; color: #0a0a0a;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Geist Mono', monospace; font-size: 10px; font-weight: 700;
}
@media (max-width: 767px) { .auth-btn .auth-btn-t { display: none; } .auth-btn { padding: 6px 8px; } }
.auth-btn:has(.auth-avatar) .auth-btn-t { display: inline; }

.auth-modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-modal.hidden { display: none; }
.auth-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(6px); }
.auth-card {
  position: relative; width: 100%; max-width: 400px;
  background: #0f0f0f; border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px; padding: 28px 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.auth-x {
  position: absolute; top: 12px; right: 14px; font-size: 20px; line-height: 1;
  color: rgba(255, 255, 255, 0.4); background: none; border: none; cursor: pointer; padding: 4px;
}
.auth-x:hover { color: #fff; }
.auth-kicker { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(163, 230, 53, 0.8); }
.auth-title { font-family: 'Instrument Serif', serif; font-size: 30px; margin: 10px 0 4px; }
.auth-sub { font-size: 12.5px; color: rgba(255, 255, 255, 0.5); margin-bottom: 18px; }
.auth-lab { display: block; font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); margin: 12px 0 5px; }
.auth-in {
  width: 100%; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px; padding: 10px 13px; font-size: 14px; color: #fff; outline: none;
  transition: border-color 0.15s;
}
.auth-in:focus { border-color: rgba(163, 230, 53, 0.5); }
.auth-in::placeholder { color: rgba(255, 255, 255, 0.3); }
.auth-msg { display: none; font-size: 12px; line-height: 1.45; border-radius: 8px; padding: 9px 11px; margin-top: 12px; }
.auth-msg.err { display: block; background: rgba(239, 68, 68, 0.09); border: 1px solid rgba(239, 68, 68, 0.3); color: #fca5a5; }
.auth-msg.ok { display: block; background: rgba(163, 230, 53, 0.08); border: 1px solid rgba(163, 230, 53, 0.3); color: #d9f99d; }
.auth-primary {
  width: 100%; margin-top: 14px; padding: 11px; border: none; border-radius: 9px;
  background: #84cc16; color: #0a0a0a; font-size: 13.5px; font-weight: 650; cursor: pointer;
  transition: filter 0.15s;
}
.auth-primary:hover { filter: brightness(1.1); }
.auth-primary:disabled { opacity: 0.6; cursor: wait; }
.auth-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.auth-link { background: none; border: none; padding: 0; font-size: 12px; color: rgba(255, 255, 255, 0.55); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.auth-link:hover { color: #d9f99d; }

/* Píldora de cartera con mercado cerrado: punto gris, sin pulso */
.pf-live.closed .pf-live-dot { background: #9ca3af; box-shadow: none; }
.pf-live.closed .pf-live-dot::after { animation: none; opacity: 0; }
.pf-live.closed .pf-live-txt { color: rgba(255,255,255,0.45); }

/* ============ Noticias (feed en vivo + filtro + newsletter) ============ */
.nw-live { display: inline-flex; align-items: center; gap: 7px; font-family: 'Geist Mono', monospace; font-size: 10.5px; letter-spacing: 0.06em; color: rgba(255,255,255,0.5); }
.nw-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px rgba(74,222,128,0.7); position: relative; }
.nw-live-dot::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid rgba(74,222,128,0.5); animation: pfLivePulse 2s ease-out infinite; }
.nw-live-txt { text-transform: uppercase; color: rgba(255,255,255,0.6); }
.nw-live-time { color: rgba(255,255,255,0.4); }

.nw-newsletter { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 18px 20px; margin-bottom: 16px;
  background: linear-gradient(120deg, rgba(163,230,53,0.06), rgba(255,255,255,0.02)); border: 1px solid rgba(163,230,53,0.18); }
.nw-nl-title { font-size: 15px; font-weight: 650; color: #fff; }
.nw-nl-sub { font-size: 12.5px; color: rgba(255,255,255,0.5); margin-top: 3px; }
.nw-nl-form { display: flex; gap: 8px; flex: 1; min-width: 260px; max-width: 420px; }
.nw-nl-input { flex: 1; background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.12); border-radius: 9px; padding: 10px 13px; font-size: 13.5px; color: #fff; outline: none; transition: border-color 0.15s; }
.nw-nl-input:focus { border-color: rgba(163,230,53,0.5); }
.nw-nl-input::placeholder { color: rgba(255,255,255,0.3); }
.nw-nl-btn { background: #84cc16; color: #0a0a0a; border: none; border-radius: 9px; padding: 10px 18px; font-size: 13px; font-weight: 650; cursor: pointer; white-space: nowrap; transition: filter 0.15s; }
.nw-nl-btn:hover { filter: brightness(1.1); }
.nw-nl-btn:disabled { opacity: 0.6; cursor: wait; }
.nw-nl-msg { flex-basis: 100%; font-size: 12px; }
.nw-nl-msg.ok { color: #a3e635; } .nw-nl-msg.err { color: #f87171; }

.nw-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 18px; }
.nw-search { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.09); border-radius: 10px; padding: 9px 13px; color: rgba(255,255,255,0.4); flex: 1; min-width: 240px; }
.nw-search input { background: none; border: none; outline: none; color: #fff; font-size: 13.5px; width: 100%; }
.nw-search input::placeholder { color: rgba(255,255,255,0.3); }
.nw-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.nw-chip { font-size: 12px; padding: 7px 13px; border-radius: 999px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.09); color: rgba(255,255,255,0.6); cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.nw-chip:hover { color: #fff; border-color: rgba(255,255,255,0.2); }
.nw-chip.active { background: rgba(163,230,53,0.12); border-color: rgba(163,230,53,0.4); color: #d9f99d; }

.nw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.nw-card { background: #0f0f0f; border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.25s cubic-bezier(0.2,0.7,0.2,1), border-color 0.2s; }
.nw-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.18); }
.nw-img { height: 148px; overflow: hidden; background: rgba(255,255,255,0.03); }
.nw-img img { width: 100%; height: 100%; object-fit: cover; }
.nw-body { padding: 14px 15px 15px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.nw-meta { display: flex; align-items: center; gap: 8px; font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.06em; color: rgba(255,255,255,0.4); }
.nw-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.nw-dot.pos { background: #4ade80; } .nw-dot.neg { background: #f87171; } .nw-dot.neu { background: rgba(255,255,255,0.25); }
.nw-src { text-transform: uppercase; color: rgba(255,255,255,0.55); }
.nw-time { margin-left: auto; }
.nw-title { font-size: 14.5px; line-height: 1.35; color: #ededed; text-decoration: none; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nw-title:hover { color: #fff; }
.nw-syms { display: flex; gap: 5px; flex-wrap: wrap; margin-top: auto; }
.nw-sym { font-family: 'Geist Mono', monospace; font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 5px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); cursor: pointer; transition: all 0.15s; }
.nw-sym:hover { background: rgba(163,230,53,0.14); border-color: rgba(163,230,53,0.4); color: #d9f99d; }
.nw-empty { grid-column: 1/-1; text-align: center; padding: 50px 20px; color: rgba(255,255,255,0.4); font-size: 13px; border: 1px dashed rgba(255,255,255,0.08); border-radius: 12px; }
.nw-card.nw-sk { padding: 16px; }
@media (prefers-reduced-motion: reduce) { .nw-live-dot::after { animation: none; } }
