/* © EmprendorNR - MarcNR. Todos los derechos reservados. */
/* Interés Gráficas – hereda tipografía y color del tema. Personalizable con variables. */
.icg {
	--icg-c0: #0d9488;
	--icg-c1: #d97706;
	--icg-c2: #7c3aed;
	--icg-c3: #e11d48;
	--icg-c4: #0284c7;
	--icg-aportado: #4be580;
	--icg-interes: #0d9488;
	--icg-tip-bg: #17212b;
	--icg-tip-fg: #f3f6f8;

	margin: 2em 0;
	padding: 0;
	font-size: .95rem;
	line-height: 1.45;
	color: inherit;
	font-variant-numeric: tabular-nums;
}

.icg *,
.icg *::before,
.icg *::after { box-sizing: border-box; }

/* Espacio reservado desde el HTML: sin saltos de diseño (CLS). */
.icg__chart {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 7;
	min-height: 200px;
	max-height: 340px;
	background: rgba(127, 127, 127, .07);
	border-radius: 4px;
	touch-action: pan-y;
	outline-offset: 3px;
}
.icg__chart.is-ready { background: none; }

.icg__svg {
	display: block;
	overflow: visible;
	font-size: 12px;
	font-family: inherit;
}

.icg-grid { stroke: currentColor; stroke-opacity: .13; }
.icg-axis { stroke: currentColor; stroke-opacity: .45; }
.icg-tick { fill: currentColor; fill-opacity: .75; font-size: 13px; }
.icg-axis-label { fill: currentColor; fill-opacity: .75; font-weight: 600; font-size:14px; }
.icg-note { fill: currentColor; font-weight: 600;text-shadow: 1px 1px 4px rgb(250, 250, 250), 1px 1px 4px rgb(250, 250, 250), 1px 1px 4px rgb(250, 250, 250);
color: #3e3f40;
font-size: 13px;  }

.icg-guide { stroke: currentColor; stroke-opacity: .5; stroke-dasharray: 3 3; }

/* Una gráfica: áreas apiladas. */
.icg-fa { fill: var(--icg-aportado); fill-opacity: .38; }
.icg-fi { fill: var(--icg-interes); fill-opacity: .6; }
.icg-top { stroke: var(--icg-interes); }
.icg-cross { fill: #fff; stroke: var(--icg-interes); stroke-width: 2.5; }
.icg-dot--top { fill: var(--icg-interes); stroke: #fff; stroke-width: 1.5; }

/* Varias gráficas: color + trazo, para no depender solo del color. */
.icg-line { fill: none; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.icg .icg-s0 { --c: var(--icg-c0); }
.icg .icg-s1 { --c: var(--icg-c1); stroke-dasharray: 8 5; }
.icg .icg-s2 { --c: var(--icg-c2); stroke-dasharray: 2 4; }
.icg .icg-s3 { --c: var(--icg-c3); stroke-dasharray: 12 4 2 4; }
.icg .icg-s4 { --c: var(--icg-c4); stroke-dasharray: 5 3 1 3 1 3; }
.icg .icg-line.icg-s0, .icg .icg-line.icg-s1, .icg .icg-line.icg-s2,
.icg .icg-line.icg-s3, .icg .icg-line.icg-s4 { stroke: var(--c); }
.icg circle.icg-dot.icg-s0, .icg circle.icg-dot.icg-s1, .icg circle.icg-dot.icg-s2,
.icg circle.icg-dot.icg-s3, .icg circle.icg-dot.icg-s4 { fill: var(--c); stroke: #fff; stroke-width: 1.5; stroke-dasharray: none; }

/* Leyenda */
.icg__key {
	display: flex;
	flex-wrap: wrap;
	gap: .35em 1.4em;
	margin: .8em 0 0;
	padding: 0;
	list-style: none;
}
.icg__key li { display: flex; align-items: center; gap: .5em; margin: 0; padding: 0; }
.icg__key li::marker { content: none; }
.icg__sw { flex: none; stroke: var(--c); stroke-width: 3; stroke-linecap: round; }
.icg__box { width: 1em; height: 1em; border-radius: 2px; flex: none; }
.icg__box--a { background: var(--icg-aportado); opacity: .55; }
.icg__box--i { background: var(--icg-interes); opacity: .8; }

.icg__meta {
	display: flex;
	flex-wrap: wrap;
	gap: .3em 1.4em;
	padding: 0;
	list-style: none;
	font-size: .85em;
	font-size: 14px;
opacity: 0.85;
color: #3f4d69;
background: #f5f2f2;
padding: 4px;
border-radius: 4px;
justify-content: center;
margin-top: 16px;
opacity: 0.7;

}
.icg__meta li { margin: 0; padding: 0; }

/* Tooltip */
.icg__tip {
	position: absolute;
	z-index: 2;
	min-width: 9.5em;
	padding: .5em .7em;
	background: var(--icg-tip-bg);
	color: var(--icg-tip-fg);
	border-radius: 4px;
	font-size: .82rem;
	line-height: 1.4;
	pointer-events: none;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.icg__tip[hidden] { display: none; }
.icg__tip-h { font-weight: 700; margin-bottom: .25em; }
.icg__tip-r { display: flex; justify-content: space-between; gap: 1.2em; }
.icg__tip-r.is-total { margin-top: .2em; padding-top: .2em; border-top: 1px solid rgba(255, 255, 255, .25); }
.icg__tip-l { display: inline-flex; align-items: center; gap: .4em; }
.icg__dot { display: inline-block; width: .7em; height: .7em; border-radius: 50%; background: var(--c, #fff); }
.icg__dot.icg-dot-a { background: var(--icg-aportado); }
.icg__dot.icg-dot-i { background: #2dd4bf; }

/* Resumen y tablas */
.icg__sum { margin: .9em 0 0; }
.icg__table {
	width: 100%;
	margin: .9em 0 0;
	border-collapse: collapse;
	font-size: .9em;
}
.icg__table th,
.icg__table td {
	padding: .4em .6em;
	text-align: right;
	border: 0;
	border-bottom: 1px solid rgba(127, 127, 127, .3);
	background: none;
}
.icg__table thead th { font-weight: 700; }
.icg__table th:first-child,
.icg__table tbody th { text-align: left; font-weight: 600; }

.icg__more { margin-top: .9em; }
.icg__more summary { cursor: pointer; font-weight: 600; }
.icg__scroll { max-height: 22em; overflow: auto; }
.icg__scroll .icg__table { margin-top: .5em; }

@media (max-width: 480px) {
	.icg { font-size: .9rem; }
	.icg__table { font-size: .82em; }
	.icg__table th, .icg__table td { padding: .35em .35em; }
}

.icg--custom .icg__chart { background: white; }
.icg--custom .icg__chart[hidden] { display: none; }

.icg__form {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: end;
	gap: 1em;
	margin: 1em 0 0;
}
.icg__form label {
	display: flex;
	flex-direction: column;
	gap: .3em;
	font-size: .85em;
	font-weight: 600;
}
.icg__form input {
	font: inherit;
	font-size: 1rem;
	padding: .4em .5em;
	border: 1px solid rgba(127, 127, 127, .4);
	border-radius: 4px;
	width: 9em;
	background: Field;
	color: FieldText;
}
.icg__gen {
	font: inherit;
	font-weight: 600;
	padding: .55em 1.2em;
	border: 0;
	border-radius: 4px;
	background: var(--icg-interes);
	color: #fff;
	cursor: pointer;
}
.icg__gen:hover { filter: brightness(1.08); }

.icg__limits {
	margin: .8em 0 0;
	font-size: .82em;
	opacity: .75;
	text-align: center;
}

.icg__cap-label {
	display: none;
	font-weight: 600;
	opacity: .75;
	margin: 0 0 .3em;
        font-size: 14px;
}

@media (max-width: 600px) {
	.icg__cap-label { display: block; }
}
