/*
  BolsaHoy · tarjetas de mercado v2 (octubre 2026).
  Jerarquía como en las apps de bolsa: un protagonista (gráfico grande con
  cierre anterior y rango del día) y apoyo compacto (chips o lista con
  minigráfico y píldora de color). Lo usan la portada y la página Mercados.
*/
.mv2 {
  --mv2-up: #21d19f;
  --mv2-down: #ff5d6c;
  --mv2-up-solid: #12b886;
  --mv2-down-solid: #e5484d;
  --mv2-ink: #eef3fb;
  --mv2-muted: rgba(238, 243, 251, .6);
  --mv2-line: rgba(255, 255, 255, .13);
  --mv2-glass: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .035));
  --mv2-panel: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .03));
  color: var(--mv2-ink);
  font-variant-numeric: tabular-nums;
}
[data-theme="light"] .mv2 {
  --mv2-up: #0f9f74;
  --mv2-down: #d93545;
  --mv2-ink: #08111f;
  --mv2-muted: #52627a;
  --mv2-line: #d3deeb;
  --mv2-glass: linear-gradient(180deg, #ffffff, #f3f7fc);
  --mv2-panel: #ffffff;
}
.mv2 * { box-sizing: border-box; }
.mv2-logo { position: relative; flex: 0 0 auto; display: inline-grid; place-items: center; width: var(--s, 36px); height: var(--s, 36px); border-radius: 50%; overflow: hidden; background: #0d1b35; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .2); }
.mv2-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mv2-logo .bh-asset-logo { width: 100% !important; height: 100% !important; min-width: 0 !important; }
.mv2-chart { display: block; width: 100%; height: 100%; overflow: visible; }
.mv2-soft { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.mv2-soft.up { color: var(--mv2-up); background: color-mix(in srgb, var(--mv2-up) 15%, transparent); }
.mv2-soft.down { color: var(--mv2-down); background: color-mix(in srgb, var(--mv2-down) 15%, transparent); }
.mv2-pill { display: inline-flex; justify-content: center; min-width: 64px; padding: 3px 8px; border-radius: 8px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.mv2-pill.up { color: var(--mv2-up); background: color-mix(in srgb, var(--mv2-up) 14%, transparent); }
.mv2-pill.down { color: var(--mv2-down); background: color-mix(in srgb, var(--mv2-down) 14%, transparent); }
.mv2-pill.flat { background: rgba(255, 255, 255, .12); color: var(--mv2-muted); }
[data-theme="light"] .mv2-pill.flat { background: #e7eef7; }

/* ── Portada: protagonista + chips ── */
.mv2-home { display: grid; gap: 14px; margin-top: 14px; }
.mv2-hero { position: relative; padding: 18px 18px 16px; border-radius: 30px; background: var(--mv2-glass); border: 1px solid var(--mv2-line); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 24px 50px -36px rgba(0, 0, 0, .7); overflow: hidden; color: inherit; text-decoration: none; }
.mv2-hero::after { content: ""; position: absolute; right: -70px; top: -70px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, var(--mv2-glow, transparent), transparent 70%); pointer-events: none; }
.mv2-hero.up { --mv2-glow: rgba(33, 209, 159, .2); }
.mv2-hero.down { --mv2-glow: rgba(255, 93, 108, .2); }
.mv2-hero-top { display: flex; align-items: center; gap: 12px; }
.mv2-hero-id { flex: 1; min-width: 0; }
.mv2-hero-id strong { display: block; font-size: 17px; font-weight: 700; }
.mv2-hero-id small { font-size: 12px; color: var(--mv2-muted); }
.mv2-link { padding: 7px 12px; border-radius: 99px; background: rgba(255, 255, 255, .08); border: 1px solid var(--mv2-line); color: var(--mv2-ink); font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.mv2-link:hover { border-color: rgba(255, 255, 255, .4); }
.mv2-price { display: flex; align-items: baseline; gap: 6px; margin-top: 16px; }
.mv2-price b { font-size: 42px; line-height: 1; font-weight: 800; letter-spacing: -.035em; }
.mv2-price span { font-size: 13px; font-weight: 700; color: var(--mv2-muted); }
.mv2-change { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12.5px; color: var(--mv2-muted); }
.mv2-hero-chart { position: relative; height: 150px; margin: 14px -18px 0; }
.mv2-prev { position: absolute; right: 12px; top: 6px; padding: 3px 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid var(--mv2-line); font-size: 10.5px; font-weight: 600; color: rgba(238, 243, 251, .8); }
.mv2-range { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 11.5px; font-weight: 600; color: var(--mv2-muted); }
.mv2-track { position: relative; flex: 1; height: 4px; border-radius: 99px; background: linear-gradient(90deg, #ff5d6c, #f5b942 50%, #21d19f); }
.mv2-track i { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(5, 10, 22, .8), 0 0 12px rgba(255, 255, 255, .6); transform: translate(-50%, -50%); }
.mv2-range-label { margin-top: 5px; text-align: center; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--mv2-muted); font-weight: 700; }
.mv2-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mv2-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; padding: 10px 9px; border-radius: 18px; background: rgba(255, 255, 255, .06); border: 1px solid var(--mv2-line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--mv2-ink); font: inherit; text-align: left; cursor: pointer; transition: transform .16s ease, background-color .16s ease; }
.mv2-chip:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, .3); }
.mv2-chip strong { display: block; max-width: 100%; font-size: 11.5px; font-weight: 700; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv2-chip > span:not(.mv2-logo) { font-size: 12px; font-weight: 800; }
.mv2-chip .mv2-long { display: none; }
.mv2-chip .mv2-short { display: inline; }
.mv2-chip .u { color: var(--mv2-up); }
.mv2-chip .d { color: var(--mv2-down); }
.mv2-chip .mv2-chip-chart { display: none; }
.mv2-chip[aria-pressed="true"] { background: #eef3fb; border-color: #eef3fb; color: #05070d; }
.mv2-chip[aria-pressed="true"] .u { color: #0a9c72; }
.mv2-chip[aria-pressed="true"] .d { color: #d5303f; }
[data-theme="light"] .mv2-chip { background: #fff; }
[data-theme="light"] .mv2-chip[aria-pressed="true"] { background: #0b1d38; border-color: #0b1d38; color: #fff; }
@media (min-width: 900px) {
  .mv2-home { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: stretch; gap: 16px; }
  .mv2-hero { padding: 24px 24px 20px; }
  .mv2-hero-chart { height: 210px; margin-inline: -24px; }
  .mv2-price b { font-size: 52px; }
  .mv2-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 10px; }
  .mv2-chip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px; row-gap: 2px; padding: 12px 14px; border-radius: 20px; }
  .mv2-chip .mv2-logo { grid-row: 1 / span 2; --s: 30px !important; }
  .mv2-chip strong { grid-column: 2; grid-row: 1; font-size: 13.5px; }
  .mv2-chip .mv2-long { display: inline; }
  .mv2-chip .mv2-short { display: none; }
  .mv2-chip > span:not(.mv2-logo):not(.mv2-chip-chart) { grid-column: 2; grid-row: 2; font-size: 12.5px; }
  .mv2-chip .mv2-chip-chart { display: block; grid-column: 3; grid-row: 1 / span 2; width: 64px; height: 30px; }
}

/* ── Página Mercados: bloques con protagonista y lista ── */
.mv2-groups { display: grid; gap: 22px; }
.mv2-group-head { display: flex; align-items: center; gap: 12px; }
.mv2-stack { display: flex; }
.mv2-stack .mv2-logo { --s: 22px; margin-left: -8px; box-shadow: 0 0 0 2px #071630; }
.mv2-stack .mv2-logo:first-child { margin-left: 0; }
.mv2-group-id { flex: 1; min-width: 0; }
.mv2-group-id h3 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.mv2-status { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--mv2-muted); white-space: nowrap; }
.mv2-status i { width: 6px; height: 6px; border-radius: 50%; background: rgba(238, 243, 251, .4); }
.mv2-status.is-live i { background: #21d19f; box-shadow: 0 0 8px #21d19f; }
.mv2-avg { display: grid; justify-items: end; font-size: 15px; font-weight: 800; }
.mv2-avg small { font-size: 10px; font-weight: 600; color: var(--mv2-muted); letter-spacing: .06em; text-transform: uppercase; }
.mv2-avg.u { color: var(--mv2-up); }
.mv2-avg.d { color: var(--mv2-down); }
.mv2-breadth { display: flex; align-items: center; gap: 10px; margin: 8px 0 10px; font-size: 11px; color: var(--mv2-muted); }
.mv2-bar { display: flex; flex: 1; gap: 2px; height: 3px; }
.mv2-bar i { border-radius: 99px; }
.mv2-bar .u { background: var(--mv2-up); }
.mv2-bar .d { background: var(--mv2-down); }
.mv2-breadth b { font-weight: 700; }
.mv2-breadth b.u { color: var(--mv2-up); }
.mv2-breadth b.d { color: var(--mv2-down); }
.mv2-card { border-radius: 22px; overflow: hidden; border: 1px solid var(--mv2-line); background: var(--mv2-panel); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 20px 44px -36px rgba(0, 0, 0, .6); }
.mv2-lead { display: block; width: 100%; padding: 14px 14px 0; border: 0; background: var(--mv2-glass); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mv2-lead-top { display: flex; align-items: center; gap: 12px; }
.mv2-id { min-width: 0; flex: 1; }
.mv2-id strong { display: block; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv2-id small { display: block; font-size: 11.5px; color: var(--mv2-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv2-q { display: grid; justify-items: end; gap: 4px; }
.mv2-q b { font-size: 15px; font-weight: 700; white-space: nowrap; }
.mv2-lead .mv2-q b { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.mv2-lead-chart { height: 92px; margin: 10px -14px 0; }
.mv2-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 64px 84px; align-items: center; gap: 11px; width: 100%; padding: 11px 14px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color .15s ease; }
.mv2-row + .mv2-row, .mv2-lead + .mv2-row { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.mv2-row:hover, .mv2-lead:hover { background-color: rgba(255, 255, 255, .06); }
.mv2-row-chart { height: 30px; }
[data-theme="light"] .mv2-row + .mv2-row, [data-theme="light"] .mv2-lead + .mv2-row { box-shadow: inset 0 1px 0 #e3ebf4; }
@media (min-width: 900px) {
  .mv2-groups { gap: 26px; }
  .mv2-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
  .mv2-rows .mv2-row { grid-template-columns: 32px minmax(0, 1fr) 46px 76px; gap: 10px; padding: 11px 14px; }
  .mv2-rows .mv2-row .mv2-logo { --s: 32px !important; }
  .mv2-rows .mv2-row { box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .05), inset 1px 0 0 rgba(255, 255, 255, .05) !important; }
  .mv2-group-head { max-width: none; }
}
.mv2-more { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 13px 14px; border: 0; border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .03); color: var(--mv2-ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.mv2-more:hover { background: rgba(255, 255, 255, .07); }
@media (max-width: 899px) {
  .mv2-groups { gap: 18px; }
  .mv2-group-head { gap: 9px; }
  .mv2-group-id h3 { font-size: 16px; }
  .mv2-status { font-size: 11px; }
  .mv2-avg { font-size: 14px; }
  .mv2-avg small { display: none; }
  .mv2-stack .mv2-logo { --s: 18px; margin-left: -6px; }
  .mv2-breadth { margin: 6px 0 8px; }
  .mv2-card { border-radius: 18px; }
  .mv2-row { grid-template-columns: 30px minmax(0, 1fr) 50px 70px; gap: 10px; padding: 9px 12px; }
  .mv2-row .mv2-logo { --s: 30px !important; }
  .mv2-id strong { font-size: 14px; }
  .mv2-id small { font-size: 11px; }
  .mv2-q b { font-size: 14px; }
  .mv2-row-chart { height: 24px; }
  .mv2-pill { min-width: 58px; padding: 2px 7px; font-size: 11.5px; }
  .mv2-more { padding: 11px 12px; font-size: 12.5px; }
  .mv2-hero { padding: 16px 16px 14px; border-radius: 24px; }
  .mv2-price b { font-size: 36px; }
  .mv2-hero-chart { height: 120px; margin-inline: -16px; }
  .mv2-chip { padding: 9px 8px; border-radius: 16px; gap: 6px; }
}
@media (max-width: 380px) {
  .mv2-row { grid-template-columns: 32px minmax(0, 1fr) 48px 78px; gap: 9px; padding: 10px 12px; }
  .mv2-pill { min-width: 66px; }
  .mv2-price b { font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) { .mv2-chip, .mv2-row { transition: none; } }

/* ── Calendario de resultados (como la app) ── */
.mv2-cal { display: grid; gap: 14px; }
.mv2-cal-summary { margin: 0; font-size: 13px; color: var(--mv2-muted); }
.mv2-cal-summary b { color: var(--mv2-ink); }
.mv2-cal-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mv2-cal-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--mv2-line); background: rgba(255, 255, 255, .06); color: var(--mv2-ink); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.mv2-cal-chip i { width: 8px; height: 8px; border-radius: 50%; }
.mv2-cal-chip b { font-weight: 800; opacity: .7; }
.mv2-cal-chip:hover { border-color: rgba(255, 255, 255, .35); }
.mv2-cal-chip.is-on { background: #eef3fb; border-color: #eef3fb; color: #05070d; }
.mv2-cal-agenda { display: grid; gap: 4px; padding: 6px 20px 10px; border-radius: 22px; border: 1px solid var(--mv2-line); background: var(--mv2-panel); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.mv2-cal-day h4 { margin: 0; padding: 16px 0 8px; font-size: 15px; font-weight: 800; color: var(--mv2-ink); }
.mv2-cal-day h4 small { font-size: 12.5px; font-weight: 600; color: var(--mv2-muted); }
.mv2-cal-day.is-today h4 { color: #8cc2ff; }
.mv2-cal-rows { display: grid; }
.mv2-cal-row { display: grid; grid-template-columns: 130px 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 52px; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, .09); }
a.mv2-cal-row { color: inherit; text-decoration: none; margin-inline: -10px; padding-inline: 10px; border-radius: 12px; transition: background-color .15s ease; }
a.mv2-cal-row:hover, a.mv2-cal-row:focus-visible { background: rgba(255, 255, 255, .07); outline: 0; }
a.mv2-cal-row:hover strong { color: #8cc2ff; }
.mv2-cal-when { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--mv2-muted); white-space: nowrap; }
.mv2-cal-when svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mv2-cal-when.pre { color: #f5b942; }
.mv2-cal-when.post { color: #a5b0ff; }
.mv2-cal-logo .bh-asset-logo { width: 32px !important; height: 32px !important; }
.mv2-cal-copy { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.mv2-cal-copy strong { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv2-cal-copy > span { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--mv2-muted); }
.mv2-cal-eps { font-size: 12px; color: var(--mv2-muted); white-space: nowrap; }
.mv2-cal-eps b { font-size: 13.5px; font-weight: 800; color: var(--mv2-ink); }
.mv2-cal-empty { margin: 0; padding: 16px 0; color: var(--mv2-muted); font-size: 13px; }
@media (max-width: 899px) {
  .mv2-cal { gap: 12px; }
  .mv2-cal-chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .mv2-cal-chips::-webkit-scrollbar { display: none; }
  .mv2-cal-chip { flex: 0 0 auto; }
  .mv2-cal-agenda { padding: 2px 14px 8px; border-radius: 20px; }
  .mv2-cal-day h4 { padding: 14px 0 6px; font-size: 14.5px; }
  .mv2-cal-row { grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-areas: "logo copy eps" "logo when eps"; row-gap: 2px; column-gap: 10px; }
  .mv2-cal-row .mv2-cal-logo { grid-area: logo; }
  .mv2-cal-row .mv2-cal-copy { grid-area: copy; }
  .mv2-cal-row .mv2-cal-when { grid-area: when; font-size: 11.5px; }
  .mv2-cal-row .mv2-cal-eps { grid-area: eps; display: grid; justify-items: end; font-size: 10.5px; line-height: 1.25; }
  .mv2-cal-logo .bh-asset-logo { width: 30px !important; height: 30px !important; }
  .mv2-cal-copy strong { font-size: 13.5px; }
}
html[data-theme="light"] .mv2-cal-row { border-top-color: rgba(15, 40, 80, .09); }
html[data-theme="light"] .mv2-cal-day.is-today h4 { color: #1f6fe0; }
