/* Motor de ventas · el componente con el look de Supernovo. Usa los tokens y las piezas .ui de ../styles.css;
   todo lo propio lleva el prefijo mt- para no chocar con el resto del sitio. Funciona en claro y dentro de .dark. */
:root { --mt-ink: #3d3d35; --mt-ink-soft: rgb(61 61 53 / .08); --mt-green-soft: rgb(14 163 113 / .08); }
.dark { --mt-ink: #c9ccd1; --mt-ink-soft: rgb(201 204 209 / .08); --mt-green-soft: rgb(16 185 129 / .12); }

.mt-head { max-width: 820px; }
.mt-head h1 { max-width: 18ch; margin-top: 20px; text-wrap: balance; font-size: clamp(36px, 4.8vw, 56px); line-height: 1.06; letter-spacing: -0.03em; }
.mt-head .lead-wide { margin-top: 20px; }
.mt { margin-top: clamp(40px, 5vw, 64px); }
.mt .ui-top .mt-ctl { display: inline-flex; align-items: center; gap: 8px; }
.mt-live { width: 7px; height: 7px; border-radius: 50%; background: var(--good); animation: mt-blink 1.6s ease-in-out infinite; }
.mt.paused .mt-live { animation: none; background: var(--faint); }
.mt .ui-btn { font: inherit; font-size: 13px; font-weight: 500; height: 30px; padding: 0 14px; color: var(--text); cursor: pointer; transition: background-color var(--d-fast) var(--ease); }
.mt .ui-btn:hover { background: var(--bg-hover); }
.mt .ui-btn:focus-visible, .mt-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Venta del mes + palancas */
.mt-sum { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: end; padding: 28px 24px 24px; }
.mt-kicker { font-size: 14px; font-weight: 500; color: var(--muted); }
.mt-total { margin: 10px 0 12px; font-size: clamp(48px, 6vw, 76px); font-weight: 600; line-height: 1; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mt-total small { margin-left: 6px; font-size: .3em; font-weight: 500; letter-spacing: -0.01em; color: var(--muted); }
.mt-lead { font-size: 15px; color: var(--muted); max-width: 44ch; }
.mt-month { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mt-month b { color: var(--text); font-weight: 600; }
.mt-split { display: grid; gap: 12px; }
.mt-bar { display: flex; height: 8px; border-radius: 999px; background: var(--bg-raised); overflow: hidden; }
.mt-bar i { display: block; height: 100%; transition: width .6s var(--ease); }
.mt-bar .p, .mt-sw.p { background: var(--mt-ink); }
.mt-bar .c, .mt-sw.c { background: var(--good); }
.mt-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.mt-legend span { display: inline-flex; align-items: center; gap: 7px; }
.mt-legend b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.mt-sw { width: 8px; height: 8px; border-radius: 50%; }
.mt-levers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.mt-lever { min-width: 0; padding: 12px 14px; transition: background-color .4s var(--ease); }
.mt-lever + .mt-lever { border-left: 1px solid var(--border); }
.mt-lever .k { font-size: 12px; color: var(--muted); }
.mt-lever .v { margin-top: 2px; font-size: 24px; font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; transition: color .4s var(--ease); }
.mt-lever .h { font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-lever.hit { background: var(--mt-green-soft); }
.mt-lever.hit .v { color: var(--accent); }
.mt-formula { font-size: 12px; color: var(--faint); }
.mt-formula b { color: var(--muted); font-weight: 500; }

/* Tablero: dos carriles × seis etapas */
.mt-scroll { overflow-x: auto; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.mt-board { min-width: 840px; padding: 4px 24px 20px; }
.mt-heads, .mt-cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.mt-heads { padding: 14px 0 12px; border-bottom: 1px solid var(--border); }
.mt-hname { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.mt-hname i { display: inline-grid; place-items: center; flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border-strong); font-style: normal; font-size: 11px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.mt-head-last .mt-hname { color: var(--accent); }
.mt-head-last .mt-hname i { background: var(--accent); border-color: var(--accent); color: #fff; }
.mt-hsub { margin-top: 4px; font-size: 12px; line-height: 1.35; color: var(--faint); }
.mt-lane { padding-top: 14px; }
.mt-lane + .mt-lane { margin-top: 14px; border-top: 1px dashed var(--border-strong); }
.mt-lane-label { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 10px; font-size: 14px; }
.mt-lane-label b { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.mt-lane-label span { font-size: 12px; color: var(--faint); }
.mt-cell { min-width: 0; }
.mt-count { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.mt-count .more { color: var(--muted); }
/* tres tarjetas exactas: 3 × 51 px (2 + 14 de padding + 18 + 1 + 16) + 2 × 6 de espacio */
.mt-stack { position: relative; display: flex; flex-direction: column; gap: 6px; height: 165px; overflow: hidden; }
.mt-opp {
  position: relative; flex: 0 0 auto; display: grid; gap: 1px; min-width: 0; padding: 7px 9px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--panel); will-change: transform;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.mt-opp .row { display: flex; align-items: center; gap: 7px; min-width: 0; }
.mt-opp .dot { flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; }
.mt-lane[data-lane="p"] .dot { background: var(--mt-ink); }
.mt-lane[data-lane="c"] .dot { background: var(--good); }
.mt-opp .dot.bridge { background: var(--mt-ink); box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--good); }
.mt-opp .name { font-size: 13px; line-height: 18px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-opp .tag { font-size: 11.5px; line-height: 16px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-opp.new { animation: rv-pop .45s var(--ease); }
.mt-opp.won { border-color: rgb(14 163 113 / .4); background: var(--mt-green-soft); }
.mt-opp.won .tag { color: var(--accent); font-weight: 600; }
.mt-opp.lost { opacity: .5; }
.mt-opp.lost .tag { color: var(--hot); }
.mt-opp.gone { opacity: 0; transition: opacity .4s var(--ease); }
.mt-float { position: absolute; right: 9px; top: -2px; font-size: 12px; font-weight: 600; color: var(--accent); pointer-events: none; font-variant-numeric: tabular-nums; animation: mt-rise 1.4s var(--ease) forwards; }

/* Contexto que se acumula */
.mt-moat { display: grid; grid-template-columns: auto auto minmax(0, 1fr); }
.mt-moat > * { min-width: 0; padding: 18px 24px; }
.mt-moat > * + * { border-left: 1px solid var(--border); }
.mt-moat .k { font-size: 12px; color: var(--muted); }
.mt-moat .v { margin-top: 2px; font-size: 28px; font-weight: 600; line-height: 1.1; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mt-moat .v small { margin-left: 6px; font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--accent); }
.mt-moat .t { align-self: center; font-size: 14px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.mt-moat .t b { color: var(--text); font-weight: 500; }

@keyframes mt-blink { 50% { opacity: .35; } }
@keyframes mt-rise { from { opacity: 1; translate: 0 0; } to { opacity: 0; translate: 0 -26px; } }

@media (max-width: 860px) {
  .mt-sum { grid-template-columns: minmax(0, 1fr); padding: 22px 18px 20px; }
  .mt-board { padding: 4px 18px 18px; }
  .mt-moat { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mt-moat > * { padding: 16px 18px; }
  .mt-moat .t { grid-column: 1 / -1; border-left: 0 !important; border-top: 1px solid var(--border); }
}
@media (max-width: 560px) {
  .mt-levers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mt-lever:nth-child(3) { border-left: 0; }
  .mt-lever:nth-child(n+3) { border-top: 1px solid var(--border); }
  .mt .ui-top > span:first-child small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mt-live, .mt-opp.new { animation: none; }
  .mt-float { display: none; }
}

/* ── Secciones de la página (A–H en el HTML) ─────────────────────────────────── */
.mt-h2 { margin-top: 12px; max-width: 20ch; text-wrap: balance; }
.mt-sub { margin-top: 20px; }
.mt-sub b { color: var(--text); font-weight: 500; }
.mt-group { display: flex; align-items: center; margin: 56px 0 20px; font-size: 22px; letter-spacing: -0.015em; }
.mt-lane-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.mt-lane-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mt-ink); }
.mt-lane-tag.c::before { background: var(--good); }
.mt-lane-tag.b::before { background: var(--mt-ink); box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--good); }

/* B · Etapas: una fila por etapa; en celular cada celda lleva su rótulo */
.mt-steps { margin-top: 48px; border: 1px solid var(--border); border-radius: 24px; background: var(--panel); overflow: hidden; }
.mt-step { display: grid; grid-template-columns: 210px minmax(0, 1fr) minmax(0, 1fr) 150px; }
.mt-step > * { padding: 24px; min-width: 0; }
.mt-step + .mt-step { border-top: 1px solid var(--border); }
.mt-step > * + * { border-left: 1px solid var(--border); }
.mt-step-head > * { padding-block: 16px; font-size: 14px; font-weight: 500; color: var(--faint); }
.mt-step p { font-size: 17px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.mt-step-name { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-content: start; }
.mt-step-name i { grid-row: span 2; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border-strong); font-style: normal; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mt-step-name b { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; line-height: 26px; }
.mt-step-name small { font-size: 14px; color: var(--faint); line-height: 1.35; margin-top: 2px; }
.mt-step-last .mt-step-name b { color: var(--accent); }
.mt-step-last .mt-step-name i { background: var(--accent); border-color: var(--accent); color: #fff; }
.mt-step-mod { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.mt-step-mod a { font-size: 15px; font-weight: 500; text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid var(--border-strong); transition: border-color var(--d-fast) var(--ease), color var(--d-fast) var(--ease); }
.mt-step-mod a:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 900px) {
  .mt-step { grid-template-columns: minmax(0, 1fr); }
  .mt-step-head { display: none; }
  .mt-step > * { padding: 16px 20px; }
  .mt-step > * + * { border-left: 0; padding-top: 0; }
  .mt-step > .mt-step-name { padding-top: 22px; }
  .mt-step > :last-child { padding-bottom: 22px; }
  .mt-step [data-l]::before { content: attr(data-l); display: block; margin-bottom: 4px; font-size: 13px; font-weight: 500; color: var(--faint); }
  .mt-step-mod { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; }
  .mt-step-mod::before { width: 100%; }
}

/* C · Oportunidades */
.mt-ocs { margin-top: 48px; display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 900px) { .mt-ocs { grid-template-columns: repeat(3, 1fr); } }
.mt-oc { padding: 24px; border: 1px solid var(--border); border-radius: 20px; background: var(--panel); }
.mt-oc-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 500; color: var(--accent); }
.mt-oc h4 { margin: 14px 0 0; font-size: 21px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.mt-oc > p:last-child { margin-top: 8px; font-size: 16px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }

/* D · Qué hago primero y F · gerente: texto a un lado, recorte al otro */
.mt-queue { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.mt-queue .kicker { display: flex; align-items: center; }
.mt-rules { margin-top: 32px; counter-reset: r; display: grid; gap: 16px; }
.mt-rules li { counter-increment: r; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; font-size: 17px; line-height: 1.45; color: var(--muted); }
.mt-rules li::before { content: counter(r); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border-strong); font-size: 13px; color: var(--muted); }
.mt-rules b { color: var(--text); font-weight: 500; }
.mt-day-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.mt-day-row .n { flex-shrink: 0; width: 22px; font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.mt-day-row .grow { flex: 1; min-width: 0; }
.mt-day-row .name { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.mt-day-row .name .mt-lane-tag { font-size: 12px; font-weight: 400; color: var(--faint); }
.mt-day-row .why { margin-top: 2px; font-size: 13px; color: var(--muted); }
.mt-day-row .side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 14px; font-variant-numeric: tabular-nums; }
.mt-day-row .side b { font-weight: 600; }
.mt-day-row:first-child { background: rgb(14 163 113 / .05); }
@media (max-width: 960px) { .mt-queue { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .mt-day-row .side .ui-pill { display: none; } }

/* E · Lo que aprende (en oscuro) */
.mt-crit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.mt-crit > div { padding: 28px; border: 1px solid var(--border); border-radius: 20px; background: var(--panel); }
.mt-crit-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 14px; font-weight: 600; }
.mt-crit h3 { margin-top: 18px; font-size: 24px; }
.mt-crit p { margin-top: 10px; font-size: 17px; color: var(--muted); text-wrap: pretty; }
.mt-learn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.mt-learn ul { display: grid; gap: 14px; }
.mt-learn li { display: flex; gap: 12px; font-size: 17px; line-height: 1.45; color: var(--muted); }
.mt-learn li svg { margin-top: .25em; color: var(--good); }
.mt-learn li b { color: var(--text); font-weight: 500; }
@media (max-width: 860px) { .mt-crit, .mt-learn { grid-template-columns: minmax(0, 1fr); } }

