/* Формулы-картинки (SVG) в статьях и шаблонах калькуляторов.
   Разметка — includes/calc-formulas.php, данные — includes/formulas/*.php */

.cl-fx {
	margin: 1.2em 0 1.6em;
	padding: 18px 20px 14px;
	border: 1px solid var(--cl-calc-color-canvas-border, #b9c9d9);
	border-radius: 10px;
	background: var(--cl-calc-color-canvas-bg, #eaf3fb);
	font-family: Arial, Helvetica, sans-serif;
	color: #1f2937;
}

.cl-fx-title {
	font-size: 16px;
	font-weight: 700;
	color: #374151;
	margin: 0 0 8px;
}

.cl-fx-intro {
	font-size: 14px;
	line-height: 1.55;
	color: #4b5563;
	margin: 0 0 12px;
}

.cl-fx-item {
	margin: 0 0 14px;
	padding: 0;
}

.cl-fx-item:last-of-type { margin-bottom: 6px; }

/* Сама формула: белая карточка, ширина по контенту, но не шире колонки */
.cl-fx-svg {
	background: #fff;
	border: 1px solid #dbe6f0;
	border-radius: 8px;
	padding: 10px 14px;
	overflow-x: auto;
}

.cl-fx-svg svg {
	display: block;
	width: 100%;
	height: auto;
	max-width: 460px;
	margin: 0 auto;
}

.cl-fx-cap {
	font-size: 13px;
	color: #6b7280;
	text-align: center;
	margin: 6px 0 0;
}

.cl-fx-legend-h {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #6b7280;
	margin: 14px 0 6px;
}

.cl-fx-legend dl {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 4px 12px;
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
}

.cl-fx-legend dt {
	font-family: Georgia, "Times New Roman", serif;
	font-style: italic;
	font-weight: 700;
	color: var(--cl-calc-color-label, #2166a5);
	white-space: nowrap;
	margin: 0;
}

/* Индексы и числа в обозначениях — прямым начертанием: курсивная кириллица
   в Georgia неузнаваема (т выглядит как m) */
.cl-fx-legend dt sub,
.cl-fx-legend dt .up {
	font-style: normal;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: 600;
}

.cl-fx-legend dd {
	margin: 0;
	color: #374151;
}

.cl-fx-note {
	font-size: 12.5px;
	line-height: 1.5;
	color: #6b7280;
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px dashed #c7d7e5;
}

@media print {
	.cl-fx { background: #fff; }
	.cl-fx-svg { overflow: visible; }
}
