/* Calculadora «¿Cuánto te queda de cada venta?» (25 nov 2026). Solo en /calculadora-ganancia-tienda-online/.
   Tokens del tema (--display, --dato) y hex de la ficha (DIRECCION.md §3). Lo que queda va en el azul de
   acento, nunca en verde: en este sitio el verde significa «lo que mejora». Radio ≤ 2 px. */

html body .cg { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
@media (min-width: 60em) { html body .cg { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* ---------------------------------------------------------------- los datos */
html body .cg-datos .etiqueta { margin: 0 0 1.25rem; }
html body .cg-par { display: grid; gap: 0 1.25rem; }
@media (min-width: 36em) { html body .cg-par { grid-template-columns: 1fr 1fr; } }
html body .cg-datos .campo { margin-bottom: 1.25rem; }
html body .cg-datos input[data-cg-num] { font-family: var(--dato), 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; font-size: 1.25rem; }
html body .cg-datos select {
	width: 100%; min-height: 3rem; padding: .7rem 2.5rem .7rem .875rem; font: inherit; font-size: 1rem; color: #0D1423;
	background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230D1423' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right .9rem center;
	border: 1px solid #C9D0DD; border-radius: 2px; appearance: none; -webkit-appearance: none; cursor: pointer;
}
html body .cg-datos select:focus-visible { outline: 2px solid #0F47CC; outline-offset: 2px; }

/* ---------------------------------------------------------------- el recibo */
html body .cg-recibo {
	background: #070C18; color: #FFFFFF; border-radius: 2px; padding: clamp(1.5rem, 4vw, 2.5rem);
	box-shadow: 0 24px 48px -28px rgba(13, 20, 35, .55);
}
@media (min-width: 60em) { html body .cg-recibo { position: sticky; top: 6rem; } }
html body .cg-recibo-cab { font-family: var(--dato), 'IBM Plex Mono', monospace; font-size: .9375rem; color: #9AA3B7; margin: 0 0 .75rem; letter-spacing: .02em; }
html body .cg-queda { margin: 0 0 1.75rem; display: flex; flex-direction: column; gap: .35rem; }
html body .cg-queda-cifra {
	font-family: var(--dato), 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; font-weight: 500;
	font-size: clamp(3rem, 9vw, 4.75rem); line-height: 1; letter-spacing: -.03em; color: #8FB4FF;
}
html body .cg-queda-txt { font-size: 1.1875rem; color: rgba(255, 255, 255, .82); }
html body .cg-pierde .cg-queda-cifra { color: #FFFFFF; text-decoration: line-through; text-decoration-thickness: 3px; text-decoration-color: rgba(255, 255, 255, .45); }

/* La barra: el precio partido en sus destinos; cada tramo tiene su fila con nombre y cifra debajo. */
html body .cg-barra { display: flex; height: 1.25rem; margin: 0 0 1.5rem; background: #1A2236; overflow: hidden; border-radius: 2px; }
html body .cg-t { display: block; height: 100%; }
html body .cg-t + .cg-t { box-shadow: inset 1px 0 0 #070C18; }
html body .cg-t-producto, html body .cg-l-producto dt::before { background: #E6ECF7; }
html body .cg-t-envio, html body .cg-l-envio dt::before { background: #B4C0D6; }
html body .cg-t-anuncios, html body .cg-l-anuncios dt::before { background: #8592AB; }
html body .cg-t-pasarela, html body .cg-l-pasarela dt::before { background: #5A6274; }
html body .cg-t-plataforma, html body .cg-l-plataforma dt::before { background: #3A4458; box-shadow: inset 0 0 0 1px #5A6274; }
html body .cg-t-queda, html body .cg-l-queda dt::before { background: #8FB4FF; }
@media (prefers-reduced-motion: reduce) { html body .cg-t { transition: none; } }

html body .cg-lineas, html body .cg-extra { margin: 0; padding: 0; }
html body .cg-l, html body .cg-extra > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .6rem 0; border-bottom: 1px dashed rgba(154, 163, 183, .35); }
html body .cg-lineas dt, html body .cg-extra dt { margin: 0; font-size: 1rem; color: rgba(255, 255, 255, .82); display: flex; align-items: center; gap: .6rem; }
html body .cg-lineas dt::before { content: ''; flex: none; width: .75rem; height: .75rem; border-radius: 1px; }
html body .cg-lineas dd, html body .cg-extra dd { margin: 0; font-family: var(--dato), 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; font-size: 1.0625rem; color: #FFFFFF; white-space: nowrap; }
html body .cg-l-queda { border-bottom: 0; padding-top: .9rem; }
html body .cg-l-queda dt { color: #FFFFFF; font-weight: 600; }
html body .cg-l-queda dd { color: #8FB4FF; font-weight: 500; }
html body .cg-extra { margin-top: 1.25rem; border-top: 1px solid rgba(154, 163, 183, .35); padding-top: .4rem; }
html body .cg-extra > div:last-child { border-bottom: 0; }
html body .cg-extra dd { font-size: 1.25rem; }
html body .cg-extra [hidden] { display: none !important; }
html body .cg-alerta { margin: 1.25rem 0 0; padding: .9rem 1rem; border-left: 2px solid #8FB4FF; background: rgba(143, 180, 255, .08); font-size: 1rem; line-height: 1.5; color: #FFFFFF; }
html body .cg-alerta[hidden] { display: none !important; }

/* En celular, mientras se llenan los datos, el resultado viaja abajo. */
html body .cg-flota {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
	padding: .85rem 1rem calc(.85rem + env(safe-area-inset-bottom)); background: #070C18; color: #FFFFFF; text-decoration: none;
	font-size: .9375rem; box-shadow: 0 -12px 24px -12px rgba(13, 20, 35, .5);
	transform: translateY(110%); transition: transform .25s ease;
}
html body .cg-flota strong { font-family: var(--dato), 'IBM Plex Mono', monospace; font-weight: 500; font-size: 1.375rem; color: #8FB4FF; font-variant-numeric: tabular-nums; }
html body .cg-flota span:last-child { color: #9AA3B7; font-size: .875rem; }
html body .cg-flota.esta { transform: none; }
@media (min-width: 60em) { html body .cg-flota { display: none; } }
@media (prefers-reduced-motion: reduce) { html body .cg-flota { transition: none; } }

/* Tabla de $100.000: la primera columna manda. */
html body #tabla-100000 .tabla-datos td:not(.tabla-texto) { font-family: var(--dato), 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Héroe corto: la herramienta es el contenido; en escritorio asoma bajo el pliegue. */
html body .cg-heroe { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2.5rem, 5vw, 3.5rem) !important; }
html body .cg-seccion { padding-top: clamp(2.5rem, 5vw, 4rem) !important; }

/* Tabla de $100.000 en celular: cada pasarela es una ficha con sus tres cifras. */
@media (max-width: 40em) {
	html body #tabla-100000 .tabla-datos thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	html body #tabla-100000 .tabla-datos, html body #tabla-100000 .tabla-datos tbody, html body #tabla-100000 .tabla-datos tr, html body #tabla-100000 .tabla-datos td { display: block; width: 100%; }
	html body #tabla-100000 .tabla-datos tr { padding: .9rem 0; border-bottom: 1px solid rgba(154, 163, 183, .35); }
	html body #tabla-100000 .tabla-datos td { padding: .15rem 0; border: 0; text-align: left; }
	html body #tabla-100000 .tabla-datos td.tabla-texto { font-weight: 600; font-size: 1.0625rem; padding-bottom: .4rem; }
	html body #tabla-100000 .tabla-datos td[data-col] { display: flex; justify-content: space-between; gap: 1rem; }
	html body #tabla-100000 .tabla-datos td[data-col]::before { content: attr(data-col); font-family: var(--display), sans-serif; opacity: .75; }
}

/* Ronda 2 del panel (25 nov). */
/* El ejemplo en el héroe: el número se ve antes de tocar nada. */
html body .cg-ejemplo { display: inline-grid; grid-template-columns: auto auto auto; align-items: baseline; column-gap: .75rem; margin-top: 2rem; text-decoration: none; color: inherit; }
html body .cg-ejemplo-de { font-family: var(--dato), monospace; font-size: clamp(1.25rem, 3vw, 1.75rem); color: #9AA3B7; }
html body .cg-ejemplo-flecha { color: #9AA3B7; font-size: 1.25rem; }
html body .cg-ejemplo-a { font-family: var(--dato), monospace; font-weight: 500; font-size: clamp(2.25rem, 6vw, 3.25rem); line-height: 1; letter-spacing: -.02em; color: #8FB4FF; }
html body .cg-ejemplo-nota { grid-column: 1 / -1; margin-top: .6rem; font-size: 1rem; color: #9AA3B7; }
html body .cg-ejemplo:hover .cg-ejemplo-nota { color: #FFFFFF; }
html body .cg-firma { margin: 1.25rem 0 0; font-family: var(--dato), monospace; font-size: .8125rem; letter-spacing: .02em; color: #9AA3B7; }
html body .cg-flota { min-height: 3.25rem; }
html body #tabla-100000 h2 { margin-bottom: 1.5rem; }
html body #tabla-100000 .cg-cita { margin-bottom: 1.75rem; }
/* Tabla en celular, más compacta: nombre y cobro arriba; lo que llega, en una segunda línea. */
@media (max-width: 40em) {
	html body #tabla-100000 .tabla-datos tr { display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; row-gap: .15rem; padding: .75rem 0; }
	html body #tabla-100000 .tabla-datos td { display: block; width: auto; }
	html body #tabla-100000 .tabla-datos td.tabla-texto { padding-bottom: 0; font-size: 1rem; }
	html body #tabla-100000 .tabla-datos td:nth-child(2) { display: block; text-align: right; font-weight: 500; }
	html body #tabla-100000 .tabla-datos td:nth-child(2)::before { content: none; }
	html body #tabla-100000 .tabla-datos td:nth-child(3), html body #tabla-100000 .tabla-datos td:nth-child(4) { display: block; grid-column: 1 / -1; font-size: .875rem; opacity: .8; }
	html body #tabla-100000 .tabla-datos td:nth-child(3)::before { content: 'Te llega '; font-family: var(--display), sans-serif; }
	html body #tabla-100000 .tabla-datos td:nth-child(4)::before { content: 'Con Shopify Basic '; font-family: var(--display), sans-serif; }
}
html body #tabla-100000 .nota a { display: inline-block; padding-block: .7rem; }
/* 26 nov: el ejemplo del héroe se parte en dos líneas si no cabe (cifras de 9 o más dígitos en celular). */
html body .cg-ejemplo { display: flex; flex-wrap: wrap; align-items: baseline; }
html body .cg-ejemplo-nota { flex-basis: 100%; }

/* 26 nov: el tema pisa el fondo de los select y se perdía la flecha (las tres calculadoras). */
html body .cg-datos select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235A6274' stroke-width='1.6'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important; background-position: right .9rem center !important; padding-right: 2.5rem !important;
}
html body .cg-datos select:focus { border-color: #0F47CC; }
