/**
 * Lomito Inversionista - Glosario.
 *
 * Mismos tokens que el resto del sitio: el modo oscuro entra solo.
 */

/* =========================================================================
 * 1. El enlace dentro de los articulos
 *
 * Tiene que leerse como una nota al pie, no como un enlace de navegacion: si
 * grita, el lector abandona el parrafo para ir a buscarlo.
 *
 * Va con el selector completo porque `.lmt-prose a` de blog.css pinta todos
 * los enlaces del cuerpo en verde, en negrita y subrayados, y encima de eso
 * el guion de abajo quedaba como un subrayado doble.
 */
.lmt-prose a.lmt-glo-enlace,
a.lmt-glo-enlace {
	color: inherit;
	font-weight: inherit;
	text-decoration: none;
	border-bottom: 1px dashed var(--lmt-accent);
	transition: background .18s ease, border-color .18s ease;
}

.lmt-prose a.lmt-glo-enlace:hover,
.lmt-prose a.lmt-glo-enlace:focus-visible,
a.lmt-glo-enlace:hover,
a.lmt-glo-enlace:focus-visible {
	background: var(--lmt-accent-soft);
	border-bottom-style: solid;
	text-decoration: none;
}

/* =========================================================================
 * 2. La pagina
 * ====================================================================== */
.lmt-glo-cuerpo {
	padding-top: clamp(24px, 4vw, 40px);
	padding-bottom: clamp(40px, 7vw, 72px);
}

.lmt-glo-abc {
	position: sticky;
	/* Debajo de la barra flotante, no detras de ella. */
	top: calc(var(--lmt-barra-alto, 0px) + 4px);
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: clamp(24px, 4vw, 36px);
	padding: 12px 0;
	background: var(--lmt-bg);
}

.lmt-glo-abc__l {
	display: grid;
	place-items: center;
	min-width: 36px;
	height: 36px;
	padding: 0 8px;
	border: 1px solid var(--lmt-border);
	border-radius: 9px;
	background: var(--lmt-surface);
	font-size: 0.9rem;
	font-weight: 800;
	color: var(--lmt-text-muted);
	text-decoration: none;
	transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.lmt-glo-abc__l:hover,
.lmt-glo-abc__l:focus-visible {
	border-color: var(--lmt-accent);
	background: var(--lmt-accent-soft);
	color: var(--lmt-accent);
}

.lmt-glo-grupo {
	margin-bottom: clamp(28px, 5vw, 44px);
	scroll-margin-top: calc(var(--lmt-barra-alto, 0px) + 60px);
}

.lmt-glo-letra {
	margin: 0 0 14px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--lmt-border);
	font-family: var(--lmt-font-display);
	font-size: clamp(1.6rem, 4vw, 2.1rem);
	font-weight: 800;
	line-height: 1;
	color: var(--lmt-accent);
}

.lmt-glo-lista {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 14px;
}

.lmt-glo-ficha {
	padding: clamp(16px, 2.5vw, 22px);
	border: 1px solid var(--lmt-border);
	border-radius: var(--lmt-radius);
	background: var(--lmt-surface);
	/* Deja aire cuando se llega por el ancla desde un articulo: la barra
	   flotante y la franja de letras ocupan la parte de arriba. */
	scroll-margin-top: calc(var(--lmt-barra-alto, 0px) + 72px);
}

/* La ficha a la que acabas de llegar se marca, para no perderla de vista. */
.lmt-glo-ficha:target {
	border-color: var(--lmt-accent);
	box-shadow: 0 0 0 3px var(--lmt-accent-soft);
}

.lmt-glo-termino {
	margin: 0 0 8px;
	font-family: var(--lmt-font-display);
	font-size: 1.12rem;
	font-weight: 800;
	line-height: 1.25;
	color: var(--lmt-text);
}

.lmt-glo-largo {
	display: block;
	margin-top: 2px;
	font-family: var(--lmt-font-body, inherit);
	font-size: 0.8rem;
	font-weight: 500;
	font-style: italic;
	color: var(--lmt-text-faint);
}

.lmt-glo-que {
	margin: 0;
	font-size: 0.96rem;
	line-height: 1.6;
	color: var(--lmt-text-muted);
}

.lmt-glo-ojo {
	margin: 12px 0 0;
	padding: 11px 13px;
	border-radius: 9px;
	background: var(--lmt-surface-2);
	font-size: 0.88rem;
	line-height: 1.55;
	color: var(--lmt-text-muted);
}

.lmt-glo-ojo strong {
	color: var(--lmt-text);
}

.lmt-glo-mas {
	display: inline-block;
	margin-top: 12px;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--lmt-accent);
	text-decoration: none;
}

.lmt-glo-mas::after {
	content: " →";
}

.lmt-glo-mas:hover {
	text-decoration: underline;
}

.lmt-glo-pie {
	margin: clamp(28px, 5vw, 44px) 0 0;
	padding-top: 20px;
	border-top: 1px solid var(--lmt-border);
	font-size: 0.9rem;
	color: var(--lmt-text-faint);
}

.lmt-glo-pie a {
	color: var(--lmt-accent);
}

/* =========================================================================
 * 3. Movil
 * ====================================================================== */
@media (max-width: 720px) {
	.lmt-glo-lista { grid-template-columns: 1fr; }
	.lmt-glo-abc__l { min-width: 32px; height: 32px; font-size: 0.82rem; }
}
