/* TryMan — estilos */
:root {
  --bg: #0b1017;
  --bg-2: #0f1620;
  --panel: #121b26;
  --panel-2: #172231;
  --line: #223042;
  --line-2: #2c3d53;
  --ink: #e6edf5;
  --ink-2: #a3b3c6;
  --ink-3: #6d7f95;
  --hal: #ff2626;
  --hal-deep: #8f0000;
  --up: #2fbf71;
  --down: #ef5350;
  --s1: #3987e5;  /* azul */
  --s2: #d95926;  /* naranja */
  --s3: #199e70;  /* aqua */
  --s4: #c98500;  /* amarillo */
  --s7: #9085e9;  /* violeta */
  --good: #0ca30c;
  --warn: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --r: 8px;
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Chakra Petch', 'Barlow', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--font); font-size: 14px; line-height: 1.45;
  font-variant-numeric: tabular-nums;
  background:
    radial-gradient(1200px 600px at 8% -10%, rgba(255, 38, 38, .06), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(57, 135, 229, .05), transparent 60%),
    var(--bg);
  min-height: 100vh;
}
a { color: var(--s1); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--s1); outline-offset: 2px; }

/* ------------------------------------------------------------ Encabezado */
.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 10px 20px;
  background: rgba(11, 16, 23, .88); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.lens {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: conic-gradient(from 210deg, #3a4656, #0d1218 25%, #56657a 50%, #0d1218 75%, #3a4656);
  box-shadow: 0 2px 6px rgba(0,0,0,.7), inset 0 0 0 1px rgba(255,255,255,.06);
}
.eye {
  position: relative; width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #ffd2d2 0 4%, #ff6b6b 9%, var(--hal) 30%, #b00000 58%, #3d0000 82%, #140000 100%);
  box-shadow: 0 0 14px 3px rgba(255, 38, 38, .45), inset 0 -4px 6px rgba(0,0,0,.55);
  transition: filter .3s ease, box-shadow .3s ease;
}
.eye::after {
  content: ''; position: absolute; left: 22%; top: 14%; width: 34%; height: 22%;
  border-radius: 50%; background: radial-gradient(ellipse at center, rgba(255,255,255,.75), rgba(255,255,255,0) 70%);
  transform: rotate(-20deg);
}
body.busy .eye { animation: blink .85s ease-in-out infinite; }
@keyframes blink {
  0%, 100% { filter: brightness(1.15); box-shadow: 0 0 22px 6px rgba(255, 38, 38, .7), inset 0 -4px 6px rgba(0,0,0,.55); }
  50% { filter: brightness(.35); box-shadow: 0 0 2px 0 rgba(255, 38, 38, .15), inset 0 -4px 6px rgba(0,0,0,.7); }
}
@media (prefers-reduced-motion: reduce) {
  body.busy .eye { animation: blink 2.4s ease-in-out infinite; }
}
.wordmark { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: .06em; line-height: 1; }
.wordmark small { display: block; font-family: var(--font); font-weight: 400; font-size: 11.5px; letter-spacing: 0; color: var(--ink-3); margin-top: 4px; }

.controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; }
.ticker {
  width: 130px; padding: 9px 12px; border-radius: 6px;
  background: var(--panel); border: 1px solid var(--line-2);
  font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: .04em; text-transform: uppercase;
}
.ticker::placeholder { color: var(--ink-3); font-weight: 400; letter-spacing: 0; text-transform: none; font-family: var(--font); font-size: 14px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; }
.seg button { background: var(--panel); border: 0; padding: 9px 14px; cursor: pointer; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button[aria-pressed="true"] { background: var(--panel-2); color: var(--ink); box-shadow: inset 0 -2px 0 var(--hal); }
.btn {
  border: 1px solid var(--line-2); background: var(--panel); border-radius: 6px; padding: 9px 14px; cursor: pointer;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: #26121a; border-color: #6a1d22; color: #ffd9d9; }
.btn.primary:hover { border-color: var(--hal); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.star { font-size: 18px; line-height: 1; padding: 7px 10px; }
.star[aria-pressed="true"] { color: var(--warn); border-color: #5b4513; }
.status { color: var(--ink-3); font-size: 12.5px; flex: 1; min-width: 160px; }
.status b { color: var(--ink-2); font-weight: 500; }
.home { font-size: 13px; white-space: nowrap; border: 1px solid var(--line-2); border-radius: 6px; padding: 7px 12px; color: var(--ink-2); }
.home:hover { color: var(--ink); text-decoration: none; border-color: var(--ink-3); }

.subbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap;
  padding: 8px 20px 0; max-width: 1680px; margin: 0 auto;
}
.watch { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-height: 26px; }
.watch .lbl { color: var(--ink-3); font-size: 12px; margin: 0 2px 0 6px; }
.watch .lbl:first-child { margin-left: 0; }
.chip.today { border-style: dashed; }
.me { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.me-text { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; text-align: right; }
.me-text b { font-weight: 600; font-size: 14px; }
.me-text span { color: var(--ink-3); font-size: 12.5px; }
.me-text span.low { color: var(--warn); }
.me-text span.out { color: #ffb3b1; }
a.btn { color: var(--ink-2); display: inline-block; }
a.btn:hover { color: var(--ink); text-decoration: none; }
.chip {
  border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2); border-radius: 999px;
  padding: 3px 11px; font-size: 12.5px; cursor: pointer;
}
.chip:hover { color: var(--ink); border-color: var(--line-2); }
.chip.on { color: var(--ink); border-color: var(--s1); }

/* ------------------------------------------------------------------ Grilla */
main { padding: 14px 20px 40px; max-width: 1680px; margin: 0 auto; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-6 { grid-column: span 6; }
.span-4 { grid-column: span 4; }
@media (max-width: 1180px) {
  .span-8, .span-6, .span-4 { grid-column: span 12; }
  .grid.d3 > .span-4 { grid-column: span 6; }
}
@media (max-width: 760px) {
  .grid.d3 > .span-4 { grid-column: span 12; }
  .top { position: static; padding: 10px 14px; gap: 10px; }
  .brand { min-width: 0; }
  .ticker { width: 110px; }
  .seg button { padding: 9px 11px; }
  main { padding: 12px 12px 32px; }
  .subbar { padding: 8px 14px 0; }
  .me { margin-left: 0; width: 100%; justify-content: space-between; }
  .me-text { align-items: flex-start; text-align: left; }
  .status { order: 5; flex-basis: 100%; }
}

.panel {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px 16px; min-width: 0; position: relative;
}
.panel h2 {
  margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: .02em; color: var(--ink);
}
.panel .sub { margin: 2px 0 12px; color: var(--ink-3); font-size: 12.5px; max-width: 70ch; }
.ph { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.panel.loading::after {
  content: 'Calculando…'; position: absolute; inset: 0; border-radius: var(--r);
  display: grid; place-items: center; color: var(--ink-3);
  background: rgba(12, 17, 24, .72);
}
.empty { color: var(--ink-3); padding: 18px 0; }
.err {
  border: 1px solid #5a2326; background: #1d1114; color: #ffc9c9; border-radius: 6px; padding: 10px 12px; margin: 0 0 12px;
}
.warnbox { border: 1px solid #4d3d14; background: #1a160c; color: #f3d99a; border-radius: 6px; padding: 8px 12px; margin: 0 0 12px; font-size: 13px; }

/* ------------------------------------------------------------------ KPIs */
.kpis { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.kpi { background: var(--panel); padding: 12px 14px; min-width: 0; }
.kpi .k { color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v { font-size: 22px; font-weight: 600; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .d { font-size: 12.5px; color: var(--ink-2); line-height: 1.35; }
.kpi.name .v { font-family: var(--font-display); letter-spacing: .03em; }
/* pre-market y after-market debajo del precio (fuera de la rueda de Nueva York) */
.kpi .xslot:empty { display: none; }
.kpi .xq { margin-top: 6px; padding-top: 5px; border-top: 1px dashed var(--line-2); line-height: 1.3; cursor: help; }
.kpi .xq .xk { display: flex; align-items: center; gap: 5px; color: var(--ink-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .xq .xv { display: block; margin-top: 1px; font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .xq .xv span { font-size: 12.5px; font-weight: 500; }
.kpi .xq.live .xk { color: #8ec5ff; }
.kpi .xq.live .xv { color: var(--ink); }
.xdot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #5aa7ff; flex: none; animation: xpulse 1.8s ease-in-out infinite; }
@keyframes xpulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .xdot { animation: none; } }
@media (max-width: 1180px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.pos { color: var(--up); } .neg { color: var(--down); }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 8px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.tag.up { color: #9be7bd; border-color: #1f5a3a; } .tag.down { color: #ffb3b1; border-color: #6a2a2a; }
.tag.warn { color: #f3d99a; border-color: #5b4513; } .tag.flat { color: var(--ink-2); }
.sig { font-family: var(--font-display); font-weight: 600; }

/* --------------------------------------------------------------- Gráficos */
#p-chart, #p-osc { display: flex; flex-direction: column; }
#p-chart .pbody { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }

.chart-main { flex: 1 1 0; min-height: 364px; position: relative; overflow: hidden; }
/* marca de agua del gráfico de velas: queda detrás de las velas (el fondo del gráfico es transparente) */
.chart-main { container-type: inline-size; isolation: isolate; }
.chart-wm { position: absolute; inset: 0; z-index: -1; pointer-events: none; user-select: none; overflow: hidden; }
.chart-wm .wm-logo { position: absolute; left: 14px; top: 12px; height: 64px; width: auto; opacity: .1; }
.chart-wm .wm-mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding-bottom: 6%; }
.chart-wm .wm-tick {
  font-family: var(--font-display); font-weight: 600; line-height: 1; letter-spacing: .04em; white-space: nowrap;
  font-size: clamp(48px, 9vw, 150px); font-size: clamp(48px, 15cqw, 150px); color: #1d2734;
}
.chart-wm .wm-brand {
  font-family: var(--font-display); font-weight: 600; line-height: 1; letter-spacing: .32em; text-indent: .32em;
  font-size: clamp(16px, 4.2cqw, 36px); color: #1f2a38;
}
@media (max-width: 760px) { .chart-wm .wm-logo { height: 42px; left: 10px; top: 8px; } }
.chart-osc { flex: 1 1 0; min-height: 210px; position: relative; overflow: hidden; }
.chart-mini { height: 170px; }
@media (max-width: 760px) { .chart-main { min-height: 280px; } }
.toggles { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.toggles label {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px 3px 8px; cursor: pointer; user-select: none;
}
.toggles input { margin: 0; accent-color: var(--s1); }
.toggles .sw { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.ohlc { font-size: 12.5px; color: var(--ink-2); min-height: 18px; margin-bottom: 4px; }
.ohlc-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 14px; }
.ohlc-row .ohlc { flex: 1 1 auto; }
.ohlc .ohlc-rsi { color: #b9b1f5; }
.vp-info { font-size: 12px; color: var(--ink-3); margin-bottom: 4px; }
.vp-info:empty { display: none; }
/* herramientas del gráfico: buscar canal y ayuda de la regla de variación */
.ctools { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; margin: -2px 0 8px; }
.tc-btn { display: inline-flex; align-items: center; gap: 6px; }
.tc-btn::before { content: ''; width: 14px; height: 10px; border-top: 2px solid #5ec8f2; border-bottom: 2px solid #5ec8f2; transform: skewY(-18deg); }
.meas-hint { font-size: 12px; color: var(--ink-3); }
/* rango del gráfico: 1M, 3M, 1A, 5A y 10A (sólo cambia lo que se ve, no el análisis) */
.seg.rng button { padding: 5px 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.seg.rng button:hover:not(:disabled) { color: var(--ink); }
.seg.rng button:disabled { opacity: .4; cursor: not-allowed; }
.rng-note { font-size: 12px; color: var(--ink-3); }
.rng-note:empty { display: none; }
.tchan { margin-top: 10px; padding: 10px 12px; border: 1px solid #23465a; border-radius: 6px; background: rgba(94, 200, 242, .05); font-size: 13px; color: var(--ink-2); }
.tchan[hidden] { display: none; }
.tc-head { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.tc-head b { color: var(--ink); font-weight: 600; }
.tc-head .note { margin: 0; }
.tc-head .btn { margin-left: auto; }
.tc-checks { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.tc-checks li { display: flex; gap: 8px; align-items: baseline; }
.tc-checks li b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.ck { flex: none; width: 16px; text-align: center; font-weight: 700; }
.ck.ok { color: var(--up); }
.ck.no { color: var(--down); }
.ck.half { color: var(--warn); }
.tc-foot { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-3); }
.tc-foot b { color: var(--warn); font-weight: 600; }
.vp-info b { color: #e0b450; font-weight: 600; }
.tabs { display: inline-flex; gap: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 2px; }
.tabs button { border: 0; background: transparent; padding: 4px 10px; border-radius: 4px; cursor: pointer; color: var(--ink-3); font-size: 12.5px; }
.tabs button[aria-selected="true"] { background: var(--panel-2); color: var(--ink); }

svg text { fill: var(--ink-2); font-family: var(--font); font-size: 11px; }
svg .ax { stroke: var(--line-2); stroke-width: 1; }
svg .grid-l { stroke: var(--line); stroke-width: 1; }
#tip {
  position: fixed; z-index: 300; pointer-events: none; display: none; /* por encima de las ventanas (200) */
  background: #0a0f15; border: 1px solid var(--line-2); border-radius: 6px; padding: 7px 10px;
  font-size: 12.5px; color: var(--ink); box-shadow: 0 6px 18px rgba(0,0,0,.5); max-width: 280px;
}

/* ------------------------------------------------------------ Veredicto */
.verdict-top { display: grid; grid-template-columns: 190px 1fr; gap: 14px; align-items: center; }
@media (max-width: 420px) { .verdict-top { grid-template-columns: 1fr; } }
.verdict-sig { font-family: var(--font-display); font-size: 26px; font-weight: 600; line-height: 1.1; }
.meter { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; margin: 6px 0 2px; }
.meter > i { display: block; height: 100%; background: var(--s1); border-radius: 3px; }
.comp { display: grid; grid-template-columns: 1fr 120px 42px; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.comp .n { color: var(--ink); } .comp .t { color: var(--ink-3); font-size: 12px; grid-column: 1 / -1; margin-top: -2px; }
.cbar { position: relative; height: 8px; background: var(--bg); border-radius: 4px; }
.cbar::before { content: ''; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--line-2); }
.cbar > i { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.comp .val { text-align: right; color: var(--ink-2); }
.mtf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0; }
.mtf div { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 12.5px; color: var(--ink-3); }
.mtf b { display: block; font-size: 14px; color: var(--ink); font-weight: 600; }
.plan { border: 1px solid var(--line-2); border-radius: 6px; padding: 10px 12px; background: var(--bg-2); }
.plan .row { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; font-size: 13.5px; }
.plan .row span:first-child { color: var(--ink-3); }

/* ---------------------------------------------------------------- Tablas */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: 12px; padding: 6px 6px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
td { padding: 6px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.r, th.r { text-align: right; }
tr:hover td { background: rgba(255,255,255,.015); }
.tscroll { overflow-x: auto; }
.prob { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; min-width: 92px; }
.prob i { display: inline-block; width: 46px; height: 6px; background: var(--bg); border-radius: 3px; position: relative; overflow: hidden; }
.prob i b { position: absolute; left: 0; top: 0; bottom: 0; background: var(--s1); border-radius: 3px; }
.lvl-r { color: #ffb3b1; } .lvl-s { color: #9be7bd; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 10px 0 0; }
.stats div { font-size: 13px; color: var(--ink-3); display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line); padding-bottom: 4px; }
.stats b { color: var(--ink); font-weight: 600; }
.bigstat { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.bigstat .v { font-size: 30px; font-weight: 600; font-family: var(--font-display); }
.bigstat .d { color: var(--ink-2); font-size: 13px; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }
.note { color: var(--ink-3); font-size: 12.5px; margin-top: 8px; }

/* --------------------------------------------------------------- Grok */
.grok-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.local { border-left: 2px solid var(--hal); padding: 2px 0 2px 12px; margin-bottom: 12px; color: var(--ink-2); }
.local p { margin: 0 0 6px; max-width: 95ch; }
.md { max-width: 95ch; }
.md h3 { font-family: var(--font-display); font-size: 14px; margin: 14px 0 6px; color: var(--ink); }
.md p { margin: 0 0 8px; color: var(--ink-2); }
.md ul { margin: 0 0 8px; padding-left: 18px; color: var(--ink-2); }
.md strong { color: var(--ink); }
.md em { color: var(--ink-3); }
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 460px; overflow-y: auto; padding-right: 4px; }
.msg { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
.msg.user { background: var(--panel-2); align-self: flex-end; max-width: 85%; }
.msg.assistant { background: var(--bg-2); }
.msg .who { font-size: 11.5px; color: var(--ink-3); margin-bottom: 4px; }
.cites { font-size: 12px; margin-top: 6px; color: var(--ink-3); }
.cites a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatbox { display: flex; gap: 8px; margin-top: 10px; }
.chatbox input { flex: 1; padding: 9px 12px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel); }
.news li { margin-bottom: 6px; }
.news { padding-left: 18px; margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
.news small { color: var(--ink-3); }

/* -------------------------------------------------------------- Bitácora */
.jform { display: grid; grid-template-columns: 130px 120px 120px 120px 1fr auto; gap: 8px; align-items: end; margin-bottom: 12px; }
.jform label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--ink-3); }
.jform input, .jform select { padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel); width: 100%; min-width: 0; }
@media (max-width: 900px) { .jform { grid-template-columns: 1fr 1fr; } .jform .wide { grid-column: 1 / -1; } }

/* --------------------------------------------------------------- Acceso */
.login { min-height: 100vh; display: grid; place-items: center; }
.login form { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; width: min(380px, 92vw); display: grid; gap: 14px; }
.login .brand { margin-bottom: 6px; }
.login label { display: grid; gap: 5px; font-size: 13px; color: var(--ink-2); }
.login input { padding: 10px 12px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); font-size: 15px; }
.login .err { margin: 0; }
.login .info { border: 1px solid #22405f; background: #0f1a28; color: #bcd6f3; border-radius: 6px; padding: 10px 12px; font-size: 14px; line-height: 1.4; }
.login .note { text-align: center; margin-top: 0; color: var(--ink-3); }
.login .or { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 12px; margin: 2px 0 -2px; }
.login .or::before, .login .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.login .gbtn { display: flex; justify-content: center; min-height: 44px; }
.login .gbtn iframe { color-scheme: normal; }

/* ---------------------------------------------------------- Usuarios */
.panel.admin { margin-bottom: 12px; border-color: #3a2a2e; }
.uform { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)) repeat(2, 120px) auto; gap: 8px; align-items: end; margin-bottom: 14px; }
.uform label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--ink-3); min-width: 0; }
.uform input, .uform select { padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel); width: 100%; min-width: 0; }
.uform .chk { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 8px; color: var(--ink-2); font-size: 13px; }
.uform .chk input { width: auto; }
.uform .acts { display: flex; gap: 6px; }
.uform h3 { grid-column: 1 / -1; margin: 0; font-family: var(--font-display); font-size: 14px; }
@media (max-width: 1280px) { .uform { grid-template-columns: repeat(4, minmax(0, 1fr)); } .uform .acts { grid-column: 1 / -1; } }
@media (max-width: 760px) { .uform { grid-template-columns: 1fr 1fr; } }
.uemail { display: block; font-size: 12px; color: var(--ink-3); }
.tag.g { color: #cfe0ff; border-color: #2c4a7a; }
.urow-off td { color: var(--ink-3); }
.ubtns { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.usage { white-space: nowrap; }
footer { color: var(--ink-3); font-size: 12px; text-align: center; padding: 10px 20px 28px; }

/* ---------------------------------------- Logo de TryMan (abre la bienvenida) */
.brand-logo {
  flex: none; display: grid; place-items: center; line-height: 0; cursor: pointer;
  margin-left: 2px; padding: 3px 5px; background: none; border: 1px solid transparent; border-radius: 6px;
}
.brand-logo img, .brand-logo-img { display: block; height: 46px; width: auto; }
.brand-logo:hover { border-color: var(--line-2); background: rgba(255, 255, 255, .03); }
.login .brand-logo-img { margin-left: auto; }
@media (max-width: 760px) { .brand-logo img { height: 38px; } }
.modal {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px;
  background: rgba(5, 8, 12, .72); backdrop-filter: blur(3px);
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(620px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 22px 24px 20px; box-shadow: 0 24px 60px rgba(0,0,0,.6);
}
.modal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.modal-head .lens { width: 40px; height: 40px; }
.modal-head .eye { width: 26px; height: 26px; }
.modal-card h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 19px; }
.modal-card .lead { margin: 0 0 16px; color: var(--ink-2); max-width: 62ch; }
.modal-card .lead p { margin: 0 0 8px; }
.modal-card .lead p:last-child { margin-bottom: 0; }
.modal-card .lead[hidden] { display: none; }
.senti { border-top: 1px solid var(--line); padding-top: 14px; }
.senti h3 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.senti .head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.senti .lbl { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.senti .tit { color: var(--ink); font-weight: 500; }
.senti p { margin: 0 0 10px; color: var(--ink-2); }
.sbar { position: relative; height: 8px; border-radius: 4px; margin: 4px 0 4px;
  background: linear-gradient(90deg, var(--critical), #8a6d3b 35%, var(--line-2) 50%, #3f8f5f 65%, var(--good)); }
.sbar i { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 2px var(--bg-2); }
.sbar-l { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); margin-bottom: 12px; }
.srcs { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.srcs li { font-size: 13.5px; color: var(--ink-2); padding-left: 10px; border-left: 2px solid var(--line-2); }
.srcs b { color: var(--ink); font-weight: 600; }
.srcs .foco { color: #9cc5f5; font-weight: 500; }
.modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.modal details { font-size: 12.5px; color: var(--ink-3); }
.modal details a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52ch; }
.loading-line { color: var(--ink-3); display: flex; align-items: center; gap: 10px; padding: 8px 0 4px; }


/* Objetivo IA con mini gráfico de la proyección */
.kpi.target { grid-column: span 2; display: grid; grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); gap: 8px; align-items: center; padding-right: 10px; }
.kpi.target .tt { min-width: 0; }
.tspark { width: 100%; max-width: 220px; height: auto; display: block; cursor: help; justify-self: end; }
.tspark .tl { font-size: 11.5px; fill: var(--ink-2); }

/* Texto de bienvenida (panel Usuarios) */
.wtext { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.wtext h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 14px; }
.wtext .note { margin: 0 0 8px; max-width: 90ch; }
.wtext textarea {
  width: 100%; min-height: 96px; resize: vertical; padding: 10px 12px; border-radius: 6px;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); line-height: 1.45;
}
.wtext-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.wtext-foot .note { margin: 0; }
.wtext-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.wtext .err { margin: 8px 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Paneles colapsables */
.phead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel.collapsible .phead h2 { cursor: pointer; }
.panel.collapsible .phead + .pbody { margin-top: 2px; }
.panel.collapsible.collapsed { align-self: start; padding-bottom: 14px; }
.pbody[hidden] { display: none !important; }
#p-osc .pbody { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.ptoggle {
  display: inline-flex; align-items: center; gap: 6px; flex: none; cursor: pointer;
  font-size: 12.5px; color: var(--ink-2); background: transparent;
  border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 8px 4px 10px;
}
.ptoggle:hover { color: var(--ink); border-color: var(--ink-3); }
.ptoggle svg { transition: transform .15s ease; }
.ptoggle[aria-expanded="true"] svg { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .ptoggle svg { transition: none; } }

/* Bienvenida: estado del pedido a Grok; informe en ventana aparte */
.senti-status { display: flex; align-items: flex-start; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; color: var(--ink-2); font-size: 13.5px; max-width: 62ch; }
.senti-status:empty { display: none; }
.senti-status .pulse {
  flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%;
  background: var(--hal); box-shadow: 0 0 8px 2px rgba(255, 38, 38, .5); animation: blink .85s ease-in-out infinite;
}
.senti-status .okmark { flex: none; color: var(--up); font-weight: 600; }
.senti-status .warnmark { flex: none; color: var(--warn); font-weight: 700; }
.modal-acts { display: flex; gap: 8px; flex-wrap: wrap; }
#senti-modal .senti { border-top: 0; padding-top: 2px; }
@media (prefers-reduced-motion: reduce) { .senti-status .pulse { animation-duration: 2.4s; } }

/* Arriba: dos columnas independientes. El gráfico tiene alto propio, así que abrir o cerrar
   la watchlist, los precios objetivo o los osciladores no lo estira ni lo achica. */
.top2 { align-items: start; }
.top2 > .col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.top2 > .col > .panel.collapsible.collapsed { align-self: stretch; } /* minimizados: ancho completo de la columna */
.top2 .chart-main { flex: none; min-height: 0; height: clamp(392px, calc(70vh - 70px), 616px); } /* 30 % menos que antes */
.top2 .chart-osc { flex: none; min-height: 0; height: 240px; }
@media (max-width: 1180px) {
  /* una sola columna: chart, watchlist, veredicto, osciladores, objetivos */
  .top2 > .col { display: contents; }
  .top2 > .col > .panel { grid-column: 1 / -1; }
  #p-chart { order: 1; } #p-watch { order: 2; } #p-fund { order: 3; } #p-verdict { order: 4; } #p-osc { order: 5; } #p-swing { order: 6; } #p-targets { order: 7; }
  .top2 .chart-main { height: 364px; }
}
@media (max-width: 760px) { .top2 .chart-main { height: 280px; } }

/* Watchlist */
.wl-add { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.wl-in, .wl-edit {
  min-width: 0; background: var(--bg); border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 9px; color: var(--ink);
  font-family: var(--font-display); font-weight: 600; font-size: 14px; letter-spacing: .04em; text-transform: uppercase;
}
.wl-in { flex: 1 1 120px; max-width: 210px; }
.wl-edit { width: 100%; max-width: 150px; padding: 4px 8px; }
.wl-in::placeholder { color: var(--ink-3); font-family: var(--font); font-weight: 400; font-size: 13px; letter-spacing: 0; text-transform: none; }
.wl-in:disabled { opacity: .55; }
.wl-count { color: var(--ink-3); font-size: 12px; margin-left: auto; white-space: nowrap; }
.wl-msg { font-size: 12.5px; color: var(--ink-2); margin: -2px 0 8px; }
.wl-msg:empty { display: none; }
.wl-msg.bad { color: #ffb3b1; }
.wl-msg button { margin-left: 6px; }
table.wl th, table.wl td { padding: 6px 4px; vertical-align: middle; }
table.wl th:first-child, table.wl td:first-child { padding-left: 0; }
table.wl th:last-child, table.wl td:last-child { padding-right: 0; }
table.wl td.num { text-align: right; white-space: nowrap; font-size: 13px; }
table.wl th.r { text-align: right; }
.wl-sym { white-space: nowrap; line-height: 1.25; }
.wl-go {
  font-family: var(--font-display); font-weight: 600; font-size: 13.5px; letter-spacing: .03em; color: #9cc5f5;
  text-decoration: underline; text-decoration-color: rgba(156, 197, 245, .35); text-underline-offset: 3px; cursor: pointer;
}
.wl-go:hover, .wl-go:focus-visible { color: #cfe3ff; text-decoration-color: currentColor; }
.wl-name { font-weight: 600; color: var(--ink); }
.wl-px { display: block; font-size: 11.5px; color: var(--ink-3); }
.wl-px.bad { color: #ffb3b1; }
.wl-stale { color: var(--warn); margin-left: 3px; cursor: help; }
/* pre-market y after-market debajo del último valor */
.wl-xs { display: block; }
.wl-ext { display: block; font-size: 11px; line-height: 1.3; color: var(--ink-3); white-space: normal; cursor: help; margin-top: 1px; }
.wl-ext > span { white-space: nowrap; }
.wl-ext .xl { display: inline-flex; align-items: center; gap: 4px; }
.wl-ext.live { color: var(--ink-2); }
.wl-ext.live .xl { color: #8ec5ff; }
.wl-ext .xdot { width: 5px; height: 5px; }
.wl-act { text-align: right; white-space: nowrap; width: 1%; }
.wl-ib {
  display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; vertical-align: middle;
  border: 1px solid transparent; border-radius: 5px; background: none; color: var(--ink-3); cursor: pointer;
}
.wl-ib:hover { color: var(--ink); border-color: var(--line-2); }
.wl-ib.del:hover { color: var(--down); }
.wl-ib.ok:hover { color: var(--up); }
.wl-ib:disabled { opacity: .4; cursor: default; }
.wl-fix { font-size: 11px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
tr.wl-sep td { border-top: 1px solid var(--line-2); }
tr.wl-empty td { color: var(--ink-3); font-size: 12.5px; padding: 10px 0; }
/* Con 20 activos, en dos columnas la tabla tiene scroll propio con el encabezado fijo:
   así la watchlist no empuja el Veredicto IA hasta abajo de la pantalla. */
@media (min-width: 1181px) {
  #wl { max-height: min(560px, calc(100vh - 220px)); overflow-y: auto; overscroll-behavior: contain; }
  #wl table.wl thead th { position: sticky; top: 0; z-index: 1; background: var(--panel); }
}
#p-watch .warnbox { margin: 0 0 8px; }
@media (max-width: 480px) {
  table.wl th, table.wl td { padding-left: 2px; padding-right: 2px; }
  table.wl th { font-size: 11.5px; }
  table.wl td.num { font-size: 12.5px; }
  .wl-ib { width: 22px; }
  .wl-fix { padding: 1px 3px; font-size: 10.5px; }
}
.wl-earn { color: var(--ink-2); }
.wl-earn.none { color: var(--ink-3); }
.wl-earn.soon { color: var(--warn); font-weight: 600; }

/* Novedades 24 h de la watchlist (Grok) */
.wn-bar { display: flex; align-items: flex-start; gap: 8px 10px; flex-wrap: wrap; margin: 0 0 10px; }
.wn-bar .wn-stat { padding-top: 4px; }
.wn-btn {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-weight: 600;
  font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); background: var(--panel-2);
}
.wn-btn svg { color: var(--hal); flex: none; }
.wn-btn:hover:not(:disabled) { border-color: var(--hal); }
.wn-stat { flex: 1; min-width: 180px; display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.wn-stat:empty { display: none; }
.wn-stat .pulse {
  flex: none; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%;
  background: var(--hal); box-shadow: 0 0 8px 2px rgba(255, 38, 38, .5); animation: blink .85s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .wn-stat .pulse { animation-duration: 2.4s; } }
.wn-bad { color: #ffb3b1; }
.linkbtn { background: none; border: 0; padding: 0; color: #9cc5f5; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linkbtn:hover { color: var(--ink); }
.wn-body { border-top: 1px solid var(--line); padding-top: 4px; }
.wn-body .warnbox { margin: 10px 0 0; }
.wn-closed { margin: 10px 0 0; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink-2); font-size: 13px; }
.wn-sec { padding: 12px 0 10px; border-bottom: 1px solid var(--line); }
.wn-sec:last-child { border-bottom: 0; }
.wn-sec h3 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.wn-sec h3 .wl-go { font-family: var(--font-display); letter-spacing: .03em; }
.wn-name { color: var(--ink-2); font-weight: 400; font-size: 13.5px; }
.wn-age { color: var(--ink-3); font-weight: 400; font-size: 12px; margin-left: auto; white-space: nowrap; }
.wn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.wn-item { display: flex; gap: 10px; align-items: flex-start; }
.wn-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; background: var(--ink-3); }
.wn-item.pos .wn-dot { background: var(--up); }
.wn-item.neg .wn-dot { background: var(--down); }
.wn-tit { color: var(--ink); font-weight: 600; font-size: 14px; line-height: 1.35; }
.wn-tit a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.wn-tit a:hover { text-decoration-color: var(--ink-2); }
.wn-src { color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.wn-src .pos { color: var(--up); }
.wn-src .neg { color: var(--down); }
.wn-item p { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; }
.wn-also, .wn-none, .wn-err { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
.wn-also span { color: var(--ink-3); }
.wn-none { color: var(--ink-3); }
.wn-err { color: #ffb3b1; }
@media (max-width: 560px) { .wn-age { margin-left: 0; flex-basis: 100%; } }

/* Informe 200 EMA de la watchlist */
.ema-btn svg { color: var(--hal); }
.modal-card.wide.ema-card { width: min(960px, 100%); }
.ema-card .modal-foot .note { flex: 1 1 380px; }
.ema-card .modal-acts { margin-left: auto; }
.ema-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; padding: 10px 0 8px; border-top: 1px solid var(--line); }
.ema-sum { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.ema-sum b { font-family: var(--font-display); font-weight: 600; }
.ema-sort button { padding: 5px 11px; font-size: 12.5px; }
.ema-legend { display: flex; gap: 4px 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.ema-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ema-legend i { display: inline-block; width: 14px; height: 0; border-top: 2px solid; }
.ema-legend .lp { border-color: #d5e0ec; border-top-width: 1.5px; }
.ema-legend .le { border-color: var(--s7); }
.ema-legend .fu, .ema-legend .fd { height: 9px; border: 0; border-radius: 2px; }
.ema-legend .fu { background: rgba(47, 191, 113, .35); }
.ema-legend .fd { background: rgba(239, 83, 80, .35); }
.ema-body .loading-line .pulse, .ema-body .err .pulse {
  flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--hal);
  box-shadow: 0 0 8px 2px rgba(255, 38, 38, .5); animation: blink .85s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .ema-body .loading-line .pulse { animation-duration: 2.4s; } }
.ema-body .warnbox, .ema-body .err { margin: 10px 0 0; }
.ema-body .err .btn { margin-left: 8px; }
.ema-row { display: grid; grid-template-columns: 168px minmax(0, 1fr) minmax(0, 1fr); gap: 8px 18px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; }
.ema-row:last-child { border-bottom: 0; }
.ema-row.sep { border-top: 1px dashed var(--line-2); margin-top: -1px; }
.ema-id { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding-top: 1px; }
.ema-sym { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: .03em; color: var(--ink); }
a.ema-sym { color: var(--s1); }
.ema-name { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ema-px { font-size: 13px; color: var(--ink); margin-top: 3px; }
.ema-date { color: var(--ink-3); font-size: 12px; }
.ema-err { grid-column: 2 / -1; color: #ffb3b1; font-size: 13px; }
.ema-cell { min-width: 0; }
.ema-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ema-lbl { font-family: var(--font-display); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.ema-lbl span { letter-spacing: 0; text-transform: none; }
.ema-dist { font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1.2; white-space: nowrap; }
.ema-dist.none { color: var(--ink-3); }
.ema-dist.short { opacity: .8; }
.ema-chart { position: relative; height: 62px; margin: 3px 0 2px; touch-action: pan-y; cursor: crosshair; }
.ema-chart svg { display: block; width: 100%; height: 100%; }
.ema-sub { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tip .pos { color: var(--up); } #tip .neg { color: var(--down); }
@media (max-width: 680px) {
  .ema-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 14px; }
  .ema-id { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
  .ema-px { margin: 0 0 0 auto; }
  .ema-err { grid-column: 1 / -1; }
  .ema-dist { font-size: 16px; }
  .ema-sub { white-space: normal; }
}
@media (max-width: 560px) {
  .modal-card.wide.ema-card { padding: 18px 14px 16px; }
  .ema-lbl span { display: none; }
}

/* Swing Trading */
.phbadge { display: inline-block; vertical-align: 2px; margin-left: 8px; font-family: var(--font); font-weight: 500; font-size: 11px; letter-spacing: 0;
  color: #f0c46a; border: 1px solid rgba(201, 133, 0, .55); background: rgba(201, 133, 0, .12); border-radius: 10px; padding: 1px 8px; white-space: nowrap; }
@media (max-width: 420px) { .phbadge { display: none; } }
#swing .loading-line .pulse { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--hal); box-shadow: 0 0 8px 2px rgba(255, 38, 38, .5); animation: blink .85s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { #swing .loading-line .pulse { animation-duration: 2.4s; } }
.sw { display: grid; gap: 12px; }
.sw-tools { display: flex; justify-content: space-between; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.sw-tools .note { margin: 0; min-width: 0; }
.sw-tools .btn { flex: none; }
.sw-head { display: flex; justify-content: space-between; gap: 12px 18px; align-items: flex-start; flex-wrap: wrap; }
.sw-title { flex: 1 1 300px; min-width: 0; }
.sw-title h3 { margin: 4px 0 4px; font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1.2; }
.sw-title p { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.sw-title .sw-also { margin-top: 4px; color: var(--ink-3); font-size: 12.5px; }
.sw-dir { display: inline-block; font-family: var(--font-display); font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; border-radius: 4px; padding: 2px 8px; }
.sw-dir.long { color: #8ee5b4; background: rgba(47, 191, 113, .14); border: 1px solid rgba(47, 191, 113, .45); }
.sw-dir.short { color: #ffb3b1; background: rgba(239, 83, 80, .14); border: 1px solid rgba(239, 83, 80, .45); }
.sw-dir.none { color: var(--ink-2); background: var(--panel-2); border: 1px solid var(--line-2); }
.sw-risk { flex: 0 0 auto; min-width: 190px; display: grid; gap: 3px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: help; }
.sw-risk b { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.sw-risk span { font-size: 11px; color: var(--ink-3); }
.sw-gauge { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.sw-gauge i { height: 7px; border-radius: 2px; background: var(--line-2); }
.sw-risk.lv1 b { color: #f3d36b; } .sw-risk.lv1 .sw-gauge i.on { background: #e7b416; }
.sw-risk.lv2 b { color: #f7a35c; } .sw-risk.lv2 .sw-gauge i.on { background: #ec835a; }
.sw-risk.lv3 b { color: #ff7a76; } .sw-risk.lv3 .sw-gauge i.on { background: #ef5350; }
.sw-risk.lv4 b { color: #ff5a55; } .sw-risk.lv4 .sw-gauge i.on { background: #c62828; }
.sw-risk.lv4 { border-color: rgba(198, 40, 40, .7); }
.sw-risk.none { cursor: default; }
.sw-warn { border-radius: 8px; padding: 10px 14px; border: 1px solid #5c4413; border-left-width: 4px; background: #1b1609; color: #f3dfae; }
.sw-warn b { display: block; font-family: var(--font-display); letter-spacing: .06em; text-transform: uppercase; font-size: 12px; margin-bottom: 3px; color: #ffd27a; }
.sw-warn p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.sw-warn ul { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: #e9cf95; }
.sw-warn ul li { margin: 2px 0; }
.sw-warn.lv2 { border-color: #6b3a1c; background: #1e130b; }
.sw-warn.lv3, .sw-warn.lv4 { border-color: #7a2422; background: #1f0e0e; color: #ffd4d2; }
.sw-warn.lv3 b, .sw-warn.lv4 b { color: #ff8f8b; }
.sw-warn.lv3 ul, .sw-warn.lv4 ul { color: #f5b9b6; }
.sw-warn.lv0 { border-color: var(--line-2); background: var(--bg-2); color: var(--ink-2); }
.sw-warn.lv0 b { color: var(--ink); }
.sw-plan { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sw-cell { padding: 8px 10px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); min-width: 0; cursor: help; }
.sw-cell span { display: block; font-size: 11.5px; color: var(--ink-3); }
.sw-cell b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 17px; margin: 1px 0; }
.sw-cell em { display: block; font-style: normal; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-cell.en { border-color: rgba(230, 237, 245, .35); }
.sw-cell.st b { color: #ff8f8b; } .sw-cell.st { border-color: rgba(239, 83, 80, .45); }
.sw-cell.tg b, .sw-cell.tg2 b { color: #8ee5b4; } .sw-cell.tg { border-color: rgba(47, 191, 113, .45); }
.sw-chart { position: relative; height: 210px; touch-action: pan-y; cursor: crosshair; }
.sw-chart svg { display: block; width: 100%; height: 100%; }
.sw-legend { display: flex; gap: 4px 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); margin-top: -6px; }
.sw-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sw-legend i { display: inline-block; width: 14px; height: 0; border-top: 2px solid; }
.sw-legend .e20 { border-color: var(--s1); } .sw-legend .e50 { border-color: var(--s2); }
.sw-legend .en { border-color: var(--ink); border-top-style: dashed; } .sw-legend .st { border-color: var(--down); } .sw-legend .tg { border-color: var(--up); }
.sw-legend .hz { height: 9px; border: 0; border-radius: 2px; background: rgba(57, 135, 229, .25); }
.sw-probs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sw-prob { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); min-width: 0; }
.sw-prob.main { border-color: var(--line-2); box-shadow: inset 0 2px 0 var(--s1); }
.sw-prob h4, .sw-h4, .sw-watch h4 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.sw-prob p { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-2); }
.sw-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--line); }
.sw-bar i.w { background: var(--up); } .sw-bar i.s { background: var(--down); } .sw-bar i.t { background: #5b6b80; }
.sw-bl { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12px; margin-top: 4px; }
.sw-bl .w { color: #8ee5b4; } .sw-bl .s { color: #ff8f8b; } .sw-bl .t { color: var(--ink-3); }
.sw-few { color: var(--warn) !important; }
.sw-last span { display: inline-block; margin: 2px 6px 0 0; padding: 0 6px; border-radius: 4px; font-size: 11.5px; border: 1px solid var(--line-2); cursor: help; }
.sw-last .pos { color: #8ee5b4; } .sw-last .neg { color: #ff8f8b; } .sw-last .neu { color: var(--ink-3); }
.sw-size { display: flex; gap: 8px 16px; align-items: flex-end; flex-wrap: wrap; padding: 10px 12px; border-radius: 8px; border: 1px dashed var(--line-2); }
.sw-size-in { display: flex; gap: 10px; flex-wrap: wrap; }
.sw-size label { display: grid; gap: 3px; font-size: 11.5px; color: var(--ink-3); }
.sw-size input { width: 120px; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font: inherit; font-size: 14px; }
.sw-pctin { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); }
.sw-pctin input { width: 70px; }
.sw-size-out { flex: 1 1 260px; }
.sw-size-out p { margin: 0; font-size: 13px; color: var(--ink-2); }
.sw-watch ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sw-watch li { display: flex; gap: 10px; align-items: baseline; font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.sw-watch li span { flex: 1; color: var(--ink-2); } .sw-watch li b { font-family: var(--font-display); } .sw-watch li em { font-style: normal; color: var(--ink-3); font-size: 12px; min-width: 56px; text-align: right; }
.sw-chk { list-style: none; margin: -2px 0 0; padding: 0; display: grid; gap: 2px; }
.sw-chk li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.sw-chk li:last-child { border-bottom: 0; }
.sw-chk i { font-style: normal; width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; }
.sw-chk li.ok i { background: rgba(47, 191, 113, .18); color: #8ee5b4; }
.sw-chk li.warn i { background: rgba(250, 178, 25, .16); color: var(--warn); }
.sw-chk li.no i { background: rgba(239, 83, 80, .16); color: #ff8f8b; }
.sw-chk li.info i { background: var(--panel-2); color: var(--ink-3); }
.sw-chk em { font-style: normal; color: var(--ink-3); font-size: 12px; text-align: right; }
.sw-hist { font-size: 13px; }
.sw-hist summary { cursor: pointer; color: var(--ink-2); }
.sw-hist table { margin-top: 6px; }
.sw-hist tr.cur td { color: var(--ink); font-weight: 600; }
.sw-foot { margin: 0; }
@media (max-width: 640px) {
  .sw-plan { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sw-probs { grid-template-columns: 1fr; }
  .sw-risk { flex: 1 1 100%; }
  .sw-chk li { grid-template-columns: 20px minmax(0, 1fr); }
  .sw-chk em { grid-column: 2; text-align: left; }
  .sw-chart { height: 180px; }
}

/* HOT & TRENDING (Watchlist) */
.hot-btn { position: relative; }
.wn-btn.hot-btn svg { color: #ff8a4c; }
.hot-btn:hover:not(:disabled) { border-color: #ff8a4c; }
.hot-card .hot-sum span { display: inline-flex; align-items: center; gap: 6px; cursor: help; }
.hot-chip {
  display: inline-block; font-style: normal; font-family: var(--font-display); font-weight: 600; font-size: 10.5px; letter-spacing: .06em;
  text-transform: uppercase; padding: 1px 7px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--ink-3); white-space: nowrap; line-height: 1.6;
}
.hot-chip.fund { color: #9cc5f5; background: rgba(57, 135, 229, .14); border-color: rgba(57, 135, 229, .5); }
.hot-chip.mom { color: #f4a984; background: rgba(217, 89, 38, .14); border-color: rgba(217, 89, 38, .55); }
.hot-chip.both { color: #ecc56f; background: rgba(201, 133, 0, .14); border-color: rgba(201, 133, 0, .55); }
.hot-body { border-top: 1px solid var(--line); }
.hot-body .loading-line .pulse {
  flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--hal);
  box-shadow: 0 0 8px 2px rgba(255, 38, 38, .5); animation: blink .85s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .hot-body .loading-line .pulse { animation-duration: 2.4s; } }
.hot-body .loading-line { padding-top: 12px; }
.hot-wait { color: var(--ink-2); align-items: flex-start; } .hot-wait .pulse { margin-top: 6px; }
.hot-body .warnbox, .hot-body .err { margin: 10px 0 0; }
.hot-body .err .btn { margin-left: 8px; }
.hot-sec { padding: 12px 0 2px; }
.hot-sec + .hot-sec { border-top: 1px solid var(--line-2); margin-top: 8px; }
.hot-sec h3 { margin: 0 0 2px; font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: .03em; }
.hot-sec h3 span { font-family: var(--font); font-weight: 400; font-size: 12.5px; letter-spacing: 0; color: var(--ink-3); margin-left: 6px; }
.hot-out { margin: 2px 0 2px; font-size: 12px; color: var(--ink-3); }
.hot-out b { color: var(--ink-2); font-weight: 600; }
.hot-row { display: grid; grid-template-columns: 22px minmax(0, 1.1fr) minmax(0, 3fr); gap: 2px 12px; padding: 9px 0 10px; border-bottom: 1px solid var(--line); align-items: baseline; }
.hot-row:last-child { border-bottom: 0; }
.hot-row.flash { animation: hotflash 1.6s ease-out; }
@keyframes hotflash { from { background: rgba(57, 135, 229, .2); } to { background: transparent; } }
.hot-hd { padding: 8px 0 4px; border-bottom: 1px solid var(--line-2); font-family: var(--font-display); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.hot-rk { font-family: var(--font-display); font-size: 13px; color: var(--ink-3); text-align: right; }
.hot-id { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; min-width: 0; }
.hot-sym { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: .03em; color: var(--s1); }
.hot-also { font-size: 10.5px; font-family: var(--font-display); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); border: 1px dashed var(--line-2); border-radius: 4px; padding: 0 5px; white-space: nowrap; cursor: help; }
a.hot-also { cursor: pointer; } a.hot-also:hover { color: var(--ink); border-color: var(--ink-3); }
.hot-name { flex-basis: 100%; color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-nums { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 1.4fr); gap: 0 8px; text-align: right; }
.hot-n { white-space: nowrap; font-size: 13.5px; cursor: help; }
.hot-hd .hot-n, .hot-hd .hot-nums span { cursor: default; }
.hot-px { color: var(--ink); }
.hot-vol { color: var(--ink-2); }
.hot-vol i { font-style: normal; font-size: 12px; color: var(--ink-3); }
.hot-vol i.hi { color: var(--warn); font-weight: 600; }
.hot-why { grid-column: 2 / -1; margin-top: 5px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.hot-why .hot-chip { margin-right: 7px; vertical-align: 1px; cursor: help; }
.hot-why.muted { color: var(--ink-3); font-size: 12.5px; }
.hot-cat { color: var(--ink); font-weight: 600; margin-right: 6px; }
.hot-cat::after { content: ':'; }
.hot-src { margin-left: 6px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
a.hot-src { color: #9cc5f5; } a.hot-src:hover { color: var(--ink); }
.hot-ref { font-size: 12.5px; color: #9cc5f5; }
.hot-skel {
  display: block; height: 10px; width: min(72%, 520px); margin-top: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--panel-2), var(--line-2), var(--panel-2)); background-size: 200% 100%; animation: hotskel 1.4s linear infinite;
}
@keyframes hotskel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .hot-skel { animation: none; } .hot-row.flash { animation: none; } }
@media (max-width: 680px) {
  .hot-hd { display: none; }
  .hot-row { grid-template-columns: 18px minmax(0, 1fr); gap: 2px 8px; }
  .hot-nums { grid-column: 2 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; text-align: left; margin-top: 6px; }
  .hot-n::before { content: attr(data-l); display: block; font-family: var(--font-display); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
  .hot-name { flex-basis: auto; }
}
@media (max-width: 560px) { .modal-card.wide.hot-card { padding: 18px 14px 16px; } }

/* Estresar y Evaluación (Grok) */
.gx-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 0; }
.gx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); background: var(--panel-2); border-color: var(--line-2);
}
.gx-btn svg { color: var(--hal); flex: none; }
.gx-btn:hover:not(:disabled) { border-color: var(--hal); }
.gx-btn:disabled { opacity: .55; cursor: default; }
.gx-pend { font-size: 12.5px; color: var(--ink-2); }
.gx-pend:empty { display: none; }
.gx-pend > div { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; }
.gx-pend .pulse, .gx-ok .pulse {
  flex: none; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%;
  background: var(--hal); box-shadow: 0 0 8px 2px rgba(255, 38, 38, .5); animation: blink .85s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .gx-pend .pulse { animation-duration: 2.4s; } }
.gx-form .note { margin: 10px 0 0; }
.gx-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin-top: 6px; }
.gx-check {
  display: flex; gap: 9px; align-items: flex-start; padding: 7px 9px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2);
}
.gx-check:hover { border-color: var(--line-2); }
.gx-check:has(input:checked) { border-color: var(--s1); background: rgba(57, 135, 229, .08); }
.gx-check input { margin: 2px 0 0; flex: none; width: 16px; height: 16px; accent-color: var(--s1); }
.gx-check b { display: block; font-weight: 600; font-size: 13.5px; color: var(--ink); }
.gx-check small { display: block; font-size: 11.5px; line-height: 1.35; color: var(--ink-3); margin-top: 1px; }
.gx-sels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-top: 8px; }
.gx-sel span { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; }
.gx-sel select {
  width: 100%; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line-2);
  background: var(--bg); color: var(--ink); font: inherit; font-size: 14px;
}
.gx-sel select:invalid { color: var(--ink-3); }
.gx-sel select option { color: var(--ink); background: var(--panel); }
.gx-info { margin: 0; max-width: 34ch; }
.gx-ok { display: flex; gap: 12px; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 14px; }
.gx-ok .okmark { color: var(--up); font-weight: 700; font-size: 18px; line-height: 1.2; }
.gx-ok p { margin: 4px 0 0; color: var(--ink-2); }
.modal-card.wide { width: min(780px, 100%); }
.gx-params { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
.gx-body { border-top: 1px solid var(--line); padding-top: 4px; max-width: none; }
.gx-body details { margin-top: 10px; }
table.mdt { margin: 4px 0 12px; font-size: 12.5px; }
table.mdt th { white-space: normal; }
table.mdt td { color: var(--ink-2); }
@media (max-width: 560px) {
  .gx-checks, .gx-sels { grid-template-columns: 1fr; }
  .gx-info { max-width: none; }
}
/* en el celular la lista es larga: el pie con "Consultar a Grok" queda siempre a la vista */
.gx-form .modal-foot {
  position: sticky; bottom: -20px; z-index: 1; margin: 16px 0 -20px; padding: 12px 0 20px;
  background: var(--bg-2); border-top: 1px solid var(--line);
}

/* Inteligencia Fundamental */
.ftabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.ftabs button {
  border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-3); border-radius: 999px;
  padding: 4px 10px; font-size: 12.5px; cursor: pointer;
}
.ftabs button:hover { color: var(--ink); border-color: var(--line-2); }
.ftabs button[aria-selected="true"] { color: var(--ink); background: var(--panel-2); border-color: var(--s1); }
/* informe ya guardado en el servidor: se ve sin gastar consultas */
.ftabs button.saved::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--up); vertical-align: 1px; }
.fpick { padding: 4px 0 2px; color: var(--ink-2); font-size: 13.5px; }
.fpick p { margin: 0 0 6px; }
.fpick b { color: var(--ink); font-weight: 600; }
.fsaved-l::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--up); vertical-align: 1px; }
.fund h4 { margin: 12px 0 6px; font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--ink-2); letter-spacing: .02em; }
.fund h4:first-child { margin-top: 2px; }
.fund table { font-size: 12.5px; }
.fund th, .fund td { padding: 5px 5px; }
.fund td.num, .fund th.r { text-align: right; white-space: nowrap; }
.fund .sm { display: block; font-size: 11.5px; color: var(--ink-3); }
.fstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 6px; margin: 2px 0 8px; }
.fstats div { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: var(--bg-2); font-size: 11.5px; color: var(--ink-3); min-width: 0; }
.fstats b { display: block; font-size: 15px; color: var(--ink); font-weight: 600; font-family: var(--font-display); letter-spacing: .02em; }
.fread { font-size: 13px; color: var(--ink-2); margin: 6px 0 8px; }
.fread b { color: var(--ink); }
.ktag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-2); white-space: nowrap; }
.ktag.buy { color: var(--up); border-color: #1f5a3c; } .ktag.sell { color: var(--down); border-color: #6a2a2a; } .ktag.grant { color: var(--ink-3); }
.pcr-scale { position: relative; height: 10px; border-radius: 5px; margin: 8px 0 4px;
  background: linear-gradient(90deg, var(--good) 0%, #5fbf7f 30%, var(--line-2) 50%, var(--serious) 66%, var(--critical) 100%); }
.pcr-scale i { position: absolute; top: -4px; width: 4px; height: 18px; margin-left: -2px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 2px var(--bg-2); }
.pcr-l { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); margin-bottom: 8px; }
.fbar { display: inline-block; height: 6px; border-radius: 3px; background: var(--s1); vertical-align: middle; }
.fbar.hi { background: var(--serious); }
.tlist { list-style: none; margin: 0; padding: 0; }
.tlist li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.tlist li:first-child { border-top: 0; }
.tlist .q { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.tlist .msg { flex-basis: 100%; font-size: 12px; color: #ffb3b1; margin-top: -2px; }
.fund .loading-line .pulse { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--hal); box-shadow: 0 0 8px 2px rgba(255, 38, 38, .5); animation: blink .85s ease-in-out infinite; }
