/* Campo · Inicio · widgets w2 (calendar, heatmap, sentiment, macro, note). Prefijo w2-. */
.w2-up { color: var(--gain); } .w2-dn { color: var(--loss); }
.w2-up, .w2-dn, .w2-tone-v, .w2-tv, .w2-td, .w2-ev-r, .w2-ev-time, .w2-nw-d, .w2-kv { font-variant-numeric: tabular-nums; }
.w2-mk { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--s3); font-size: 11px; }

/* controles compactos de la cabecera */
.w2-seg > button { min-height: 32px; padding: 0 10px; font-size: 13px; }
.w2-seg { padding: 2px; }
.w2-seg .seg-pill { top: 2px; bottom: 2px; left: 2px; width: calc((100% - 4px) / var(--n, 1)); }
.w2-sel { width: auto; min-height: 36px; max-width: 150px; padding: 0 28px 0 10px; font: inherit; font-size: 13px; color: var(--text); background-color: var(--s2); border: 1px solid var(--line); border-radius: var(--r-sm); appearance: none; -webkit-appearance: none; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.w2-sel:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.w2-sel-f { width: 100%; max-width: none; min-height: 44px; font-size: 14px; }
.w2-fld { display: grid; gap: 6px; margin-bottom: 12px; } .w2-fld label { font-size: 14px; font-weight: 500; }
.w2-in { min-height: 44px; font-size: 14px; }
.w2-fs { border: 0; padding: 0; margin: 0 0 12px; } .w2-fs legend { font-size: 14px; font-weight: 500; padding: 0 0 6px; }
.w2-chk { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; }
.w2-chk input { width: 18px; min-height: 18px; height: 18px; padding: 0; accent-color: var(--accent); box-shadow: none; }

/* ---------- calendar ---------- */
.w2-cal { display: flex; flex-direction: column; gap: 8px; overflow: auto; overscroll-behavior: contain; }
.w2-cal-list { flex: 1; min-height: 0; }
.w2-day-h { margin: 10px 0 4px; font-size: 12.5px; font-weight: 600; color: var(--text-2); letter-spacing: 0; }
.w2-day:first-child .w2-day-h { margin-top: 0; }
.w2-day-h[data-today] { color: var(--accent-ink); }
.w2-ev { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 4px 8px; margin: 0 -8px; border-radius: var(--r-sm); text-align: left; color: inherit; font-size: 13.5px; box-sizing: content-box; max-width: 100%; }
.w2-ev-earn { background: none; border: 0; cursor: pointer; min-height: 44px; transition: background-color 150ms var(--ease-out); }
@media (hover: hover) { .w2-ev-earn:hover { background: var(--s2); } }
.w2-ev-earn:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.w2-ev-main { flex: 1; min-width: 0; display: grid; }
.w2-ev-t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w2-ev-econ .w2-ev-t { white-space: normal; line-height: 1.3; }
.w2-ev-s { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w2-ev-time { font-family: var(--mono); font-size: 12px; color: var(--text-3); width: 38px; flex: none; }
.w2-ev-r { font-family: var(--mono); font-size: 12px; color: var(--text-2); white-space: nowrap; flex: none; }
.w2-flag { font-family: var(--mono); font-size: 11px; line-height: 1; padding: 3px 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--text-2); flex: none; white-space: nowrap; }
.w2-dots { display: inline-flex; gap: 3px; flex: none; } .w2-dots i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--text-3); box-sizing: border-box; }
.w2-dots i[data-on] { background: var(--text-2); border-color: var(--text-2); }
.w2-empty, .w2-note { margin: 8px 0 0; font-size: 12.5px; color: var(--text-3); }
@media (max-width: 420px) { .w2-ev-r { display: none; } }

/* ---------- heatmap ---------- */
.w2-hm { position: relative; width: 100%; height: 100%; min-height: 280px; overflow: hidden; outline: none; }
.w2-hm:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); border-radius: var(--r-sm); }
.w2-hm-cv { display: block; touch-action: manipulation; }
.w2-probe { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.w2-tip { position: absolute; left: 0; top: 0; z-index: 3; display: grid; gap: 2px; max-width: 220px; padding: 8px 10px; font-size: 12.5px; color: var(--text); background: var(--s3); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--sh-2); pointer-events: none; }
.w2-tip[hidden] { display: none; }
.w2-tip span { color: var(--text-2); } .w2-tip .w2-tip-d { font-family: var(--mono); font-weight: 600; } .w2-tip .w2-up { color: var(--gain); } .w2-tip .w2-dn { color: var(--loss); }

/* ---------- sentiment ---------- */
.w2-sent { display: flex; flex-direction: column; gap: 12px; overflow: auto; overscroll-behavior: contain; }
.w2-tone-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.w2-tone-l { font-size: 13px; color: var(--text-2); } .w2-tone-v { font-size: 14px; font-weight: 600; font-family: var(--mono); }
.w2-bar { position: relative; height: 8px; border-radius: 4px; background: var(--s3); }
.w2-bar-z { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1.5px; background: var(--text-3); }
.w2-bar-f { position: absolute; top: 0; bottom: 0; width: var(--w, 0); border-radius: 4px; transform-origin: var(--o, 0) 50%; animation: w2-grow 420ms var(--ease-out) both; }
.w2-pos { left: 50%; --o: 0%; background: var(--gain); } .w2-neg { right: 50%; --o: 100%; background: var(--loss); }
@keyframes w2-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.w2-bar-s { display: flex; justify-content: space-between; margin-top: 6px; font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.w2-cap { margin: 6px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--text-3); }
.w2-news { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.w2-nw { display: flex; gap: 10px; align-items: flex-start; width: 100%; min-height: 44px; padding: 8px; margin: 0 -8px; box-sizing: content-box; max-width: 100%; text-align: left; color: inherit; background: none; border: 0; border-radius: var(--r-sm); cursor: pointer; transition: background-color 150ms var(--ease-out); }
@media (hover: hover) { .w2-nw:hover { background: var(--s2); } }
.w2-nw:focus-visible { outline: 2px solid var(--accent); }
.w2-nw .cmk, .w2-nw .w2-mk { flex: none; margin-top: 1px; }
.w2-nw-m { display: grid; gap: 2px; min-width: 0; }
.w2-nw-meta { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); } .w2-nw-meta b { color: var(--text-2); font-weight: 600; }
.w2-nw-d { font-family: var(--mono); font-size: 12px; }
.w2-nw-t { font-size: 14px; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.w2-nw-src { font-size: 12px; color: var(--text-3); }

/* ---------- macro ---------- */
.w2-macro { display: flex; flex-direction: column; gap: 12px; overflow: auto; overscroll-behavior: contain; }
.w2-mgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.w2-mgrid[data-size="S"] { grid-template-columns: 1fr; gap: 0; }
@media (max-width: 380px) { .w2-mgrid[data-size]:not([data-size="S"]) { grid-template-columns: 1fr; } }
.w2-tile { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n n" "v sp" "d sp" "g g"; gap: 2px 8px; padding: 10px 12px; background: var(--s2); border-radius: var(--r-md); cursor: help; }
.w2-mgrid[data-size="L"] .w2-tile { padding: 14px; gap: 4px 10px; }
.w2-mgrid[data-size="S"] .w2-tile { grid-template-areas: "n v sp" "n d sp"; grid-template-columns: minmax(0, 1fr) auto auto; background: none; border-radius: 0; padding: 6px 0; align-items: center; border-bottom: 1px solid var(--line); }
.w2-mgrid[data-size="S"] .w2-tile:last-child { border-bottom: 0; }
.w2-mgrid[data-size="S"] .w2-tn { align-self: center; } .w2-mgrid[data-size="S"] .w2-tv, .w2-mgrid[data-size="S"] .w2-td { justify-self: end; }
.w2-tn { grid-area: n; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w2-tv { grid-area: v; font-size: 18px; font-weight: 600; line-height: 1.2; }
.w2-mgrid[data-size="S"] .w2-tv { font-size: 15px; }
.w2-td { grid-area: d; font-family: var(--mono); font-size: 12.5px; }
.w2-tsp { grid-area: sp; align-self: center; line-height: 0; }
.w2-sp { color: var(--text-3); } .w2-sp.w2-up { color: var(--gain); } .w2-sp.w2-dn { color: var(--loss); }
.w2-tg { grid-area: g; font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.w2-read { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--text-2); }
.w2-read[hidden] { display: none; }

/* ---------- note ---------- */
.w2-nbody { position: relative; display: flex; flex-direction: column; min-height: 0; }
.w2-ta { flex: 1; width: 100%; min-height: 80px; padding: 0; font: inherit; font-size: 14px; line-height: 1.5; color: var(--text); background: none; border: 0; box-shadow: none; border-radius: 0; resize: none; outline: none; }
.w2-ta::placeholder { color: var(--text-3); }
.w2-ta:focus-visible { outline: none; box-shadow: none; }
/* el área de texto no lleva borde propio: el foco se marca en su contenedor (antes no se veía en ningún lado) */
.w2-nbody:focus-within { outline: 2px solid var(--accent-ink); outline-offset: 4px; border-radius: var(--r-sm); }
.w2-saved { position: absolute; right: 0; bottom: 0; font-size: 12px; color: var(--text-3); opacity: 0; transition: opacity 400ms var(--ease-out); pointer-events: none; }
.w2-saved[data-on] { opacity: 1; transition-duration: 120ms; }
.w2-kpi { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; }
.w2-kpi[hidden], .w2-ta[hidden], .w2-saved[hidden], .w2-kfields[hidden] { display: none; }
.w2-kv { font-family: var(--font); font-size: clamp(28px, 9cqw, 44px); font-weight: 700; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; line-height: 1.05; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w2-kl { font-size: 13.5px; color: var(--text-2); }
.w2-prog { height: 4px; border-radius: 2px; background: var(--s3); overflow: hidden; margin-top: 4px; } .w2-prog i { display: block; width: 100%; height: 100%; background: var(--accent); border-radius: 2px; transform-origin: left center; transform: scaleX(var(--s, 0)); transition: transform 400ms var(--ease-out); }
.w2-kt { font-size: 12.5px; color: var(--text-3); font-family: var(--mono); }

@media (prefers-reduced-motion: reduce) {
  .w2-bar-f { animation: none; } .w2-prog i, .w2-saved, .w2-ev-earn, .w2-nw { transition: none; }
}

/* --- ajustes S/M --- */
.w2-info { flex: none; width: 20px; height: 20px; min-height: 0; padding: 0; margin-right: auto; margin-left: 6px; border: 1px solid var(--line); border-radius: 50%; background: none; color: var(--text-3); font: italic 600 11px var(--font); line-height: 1; cursor: pointer; position: relative; }
.w2-info::after { content: ""; position: absolute; inset: -12px; }
.w2-info:focus-visible { outline: 2px solid var(--accent); }
.w2-tone-l { margin: 0; }
.w2-sent[data-msize="S"] .w2-cap { display: none; }
.w2-sent[data-msize="S"] .w2-tone[data-cap="1"] .w2-cap { display: block; position: absolute; z-index: 2; left: 0; right: 0; margin: 6px 0 0; padding: 8px 10px; background: var(--s3); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--sh-2); color: var(--text-2); }
.w2-sent[data-msize="S"] .w2-bar-s, .w2-sent[data-msize="S"] .w2-nw-src { display: none; }
.w2-sent[data-msize="S"] { gap: 6px; overflow: hidden; }
.w2-sent[data-msize="S"] .w2-tone { position: relative; }
.w2-sent[data-msize="S"] .w2-tone-top { margin-bottom: 6px; }
.w2-sent[data-msize="S"] .w2-nw { padding: 4px 8px; min-height: 0; }
.w2-sent:not([data-msize="S"]) .w2-info { display: none; }
.w2-macro[data-msize="M"] .w2-mgrid { gap: 6px; }
.w2-macro[data-msize="M"] .w2-tile { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "n n sp" "v d sp"; align-items: center; padding: 8px 10px; gap: 2px 8px; }
.w2-macro[data-msize="M"] .w2-tg { display: none; }
.w2-macro[data-msize="M"] .w2-tv { font-size: 16px; }
.w2-macro[data-msize="M"] .w2-tsp { grid-row: 1 / 3; }
