/* ==========================================================================
   Vitrolix — раздел MeldaVX, документация (десктопная версия).
   Подключается после css/main.css только на страницах раздела.
   ========================================================================== */

body.melda-docs-body {
	margin: 0;
	font-family: Verdana, Geneva, sans-serif;
	color: #1d2b32;
	background: #ffffff;
	-webkit-font-smoothing: antialiased;
}

.melda-contentpage {
	width: 80%;
	max-width: 1240px;
	margin-left: auto;
	margin-right: auto;
}

/* ---------- Хлебные крошки и навигация по разделу ---------- */

.docbreadcrumbs {
	margin-top: 28px;
	font-family: Verdana, Geneva, sans-serif;
	font-size: 13px;
	color: #6b767c;
}

.docbreadcrumbs a {
	color: #0f8fad;
	text-decoration: none;
}

.docbreadcrumbs a:hover {
	text-decoration: underline;
}

.docbreadcrumbs-sep {
	margin: 0 8px;
	color: #b7c2c7;
}

.docsubnav {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	margin-top: 16px;
	border-bottom: 1px solid #e5e8ea;
}

.docsubnav-link {
	position: relative;
	padding: 10px 14px;
	margin-bottom: -1px;
	color: #1d2b32;
	font-family: Verdana, Geneva, sans-serif;
	font-size: 14px;
	text-decoration: none;
	border-bottom: 2px solid transparent;
	-webkit-tap-highlight-color: transparent;
}

.docsubnav-link:hover {
	color: #0f8fad;
	background: #f7fafb;
}

.docsubnav-link.is-active {
	color: #0f8fad;
	font-weight: bold;
	border-bottom-color: #0f8fad;
}

.docsubnav-link:focus-visible {
	outline: 2px solid #0f8fad;
	outline-offset: 2px;
}

/* ---------- Макет «оглавление + статья» ---------- */

.docslayout {
	display: grid;
	grid-template-columns: 252px minmax(0, 1fr);
	gap: 40px;
	align-items: start;
	margin-top: 30px;
}

.docslayout--single {
	grid-template-columns: minmax(0, 1fr);
	max-width: 980px;
}

.docstoc {
	position: sticky;
	top: 20px;
	min-width: 0;
}

.docstoc-inner {
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	padding: 18px 16px;
	border-radius: 16px;
	background: #f4f6f7;
	font-family: Verdana, Geneva, sans-serif;
	font-size: 13px;
}

.docstoc-title {
	margin-bottom: 10px;
	color: #0f8fad;
	font-size: 12px;
	font-weight: bold;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.docstoc-list,
.docstoc-sublist {
	margin: 0;
	padding: 0;
	list-style: none;
}

.docstoc-item {
	margin: 0 0 2px;
}

.docstoc-link {
	display: block;
	padding: 5px 8px;
	border-radius: 7px;
	color: #34434a;
	line-height: 1.35;
	text-decoration: none;
}

.docstoc-link:hover {
	color: #0f8fad;
	background: #e8f3f6;
}

.docstoc-link.is-active {
	color: #0b7088;
	background: #ffffff;
	font-weight: bold;
	box-shadow: inset 3px 0 0 #0f8fad;
}

.docstoc-sublist {
	padding-left: 12px;
}

.docstoc-link--sub {
	font-size: 12.5px;
	color: #5d6b72;
	padding-top: 4px;
	padding-bottom: 4px;
}

.docstoc-top {
	display: inline-block;
	margin-top: 10px;
	padding: 5px 8px;
	color: #0f8fad;
	font-size: 12.5px;
	text-decoration: none;
}

/* ---------- Статья ---------- */

.mdoc-article {
	min-width: 0;
	font-family: Verdana, Geneva, sans-serif;
	font-size: 15px;
	line-height: 1.65;
	color: #1d2b32;
}

.mdoc-article a {
	color: #0f8fad;
}

.mdoc-article a:hover {
	color: #0b7088;
}

.mdoc-h1 {
	margin: 0 0 16px;
	color: #1d2b32;
	font-size: 32px;
	line-height: 1.22;
	letter-spacing: -0.4px;
	scroll-margin-top: 24px;
}

.mdoc-lead {
	margin: 0 0 26px;
	color: #3d4a50;
	font-size: 17px;
	line-height: 1.6;
}

.mdoc-h2 {
	margin: 0 0 14px;
	color: #0f8fad;
	font-size: 24px;
	line-height: 1.3;
	letter-spacing: -0.3px;
	scroll-margin-top: 24px;
}

.mdoc-h3 {
	margin: 26px 0 10px;
	color: #1d2b32;
	font-size: 18px;
	line-height: 1.35;
	scroll-margin-top: 20px;
}

.mdoc-section {
	margin: 0;
	padding-top: 26px;
	border-top: 1px solid #edf0f2;
	scroll-margin-top: 24px;
}

.mdoc-section + .mdoc-section {
	margin-top: 26px;
}

.mdoc-article > .mdoc-section:first-of-type {
	padding-top: 0;
	border-top: 0;
}

.mdoc-article p {
	margin: 0 0 14px;
}

.mdoc-article p:last-child {
	margin-bottom: 0;
}

.mdoc-list {
	margin: 0 0 16px;
	padding-left: 22px;
}

.mdoc-list li {
	margin-bottom: 6px;
}

.mdoc-list li:last-child {
	margin-bottom: 0;
}

/* Инлайн-код и блоки кода */

.mdoc-inline {
	padding: 1px 5px;
	border-radius: 5px;
	background: #eef3f5;
	color: #0b4f5e;
	font-family: Consolas, "Courier New", monospace;
	font-size: 13px;
	white-space: nowrap;
}

.mdoc-code {
	margin: 16px 0 20px;
	padding: 16px 18px;
	overflow-x: auto;
	border-radius: 12px;
	background: #1e2a30;
	color: #e8f0f3;
	font-family: Consolas, "Courier New", monospace;
	font-size: 13px;
	line-height: 1.55;
	tab-size: 4;
}

.mdoc-code code {
	font-family: inherit;
	font-size: inherit;
	color: inherit;
	white-space: pre;
}

/* Замечания */

.mdoc-note {
	margin: 16px 0 20px;
	padding: 14px 16px;
	border-left: 4px solid #0f8fad;
	border-radius: 10px;
	background: #eef8fb;
	color: #23434c;
	font-size: 14px;
	line-height: 1.55;
}

.mdoc-note--important {
	border-left-color: #c4554d;
	background: #fdf1f0;
	color: #5a2a27;
}

.mdoc-note--tip {
	border-left-color: #3c9a5f;
	background: #eef8f1;
	color: #234a32;
}

.mdoc-note p:last-child {
	margin-bottom: 0;
}

/* Таблицы */

.mdoc-table-wrap {
	margin: 16px 0 22px;
	overflow-x: auto;
	border: 1px solid #e2e8ea;
	border-radius: 12px;
}

.mdoc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
	line-height: 1.5;
}

.mdoc-table caption {
	padding: 10px 14px;
	color: #6b767c;
	font-size: 12.5px;
	font-style: italic;
	text-align: left;
	background: #fafcfc;
	border-bottom: 1px solid #e2e8ea;
}

.mdoc-table th {
	padding: 9px 12px;
	background: #eef6f8;
	color: #1d4f5c;
	font-weight: bold;
	text-align: left;
	vertical-align: bottom;
	border-bottom: 1px solid #d9e5e9;
}

.mdoc-table td {
	padding: 9px 12px;
	vertical-align: top;
	border-bottom: 1px solid #eef1f3;
}

.mdoc-table tbody tr:last-child td {
	border-bottom: 0;
}

.mdoc-table tbody tr:nth-child(even) td {
	background: #fbfcfc;
}

/* Иллюстрации */

.mdoc-figure {
	margin: 18px 0 22px;
}

.mdoc-figure img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid #e2e8ea;
	border-radius: 12px;
	background: #f4f6f7;
}

.mdoc-figure figcaption {
	margin-top: 8px;
	color: #6b767c;
	font-size: 12.5px;
	line-height: 1.45;
}

/* ---------- Страница «О фреймворке» ---------- */

/* Компактная шапка: страница должна укладываться в один экран. */
.melda-docs--about .emblemheader {
	margin-top: 18px;
	margin-bottom: 26px;
}

.melda-docs--about .docbreadcrumbs {
	margin-top: 18px;
}

.melda-docs--about .docsubnav {
	margin-top: 12px;
}

.melda-docs--about .docslayout {
	margin-top: 20px;
}

.melda-docs--about .docfooter {
	margin-top: 26px;
}

.melda-docs--about .mdoc-h1 {
	font-size: 30px;
	margin-bottom: 12px;
}

.melda-docs--about .mdoc-lead {
	margin-bottom: 18px;
}

.mdoc-about-hero {
	display: flex;
	align-items: center;
	gap: 38px;
	margin: 10px 0 6px;
}

.mdoc-about-copy {
	flex: 1 1 56%;
	min-width: 0;
}

.mdoc-about-shot {
	flex: 0 0 40%;
	margin: 0;
}

.mdoc-about-shot img {
	box-shadow: 0 8px 24px rgba(20, 40, 50, 0.12);
}

.mdoc-feature-list {
	margin: 0 0 22px;
	padding: 0;
	list-style: none;
}

.mdoc-feature-list li {
	position: relative;
	margin: 0 0 9px;
	padding-left: 24px;
	color: #3d4a50;
	font-size: 14.5px;
	line-height: 1.5;
}

.mdoc-feature-list li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0;
	color: #0f8fad;
	font-weight: bold;
}

.mdoc-about-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.mdoc-models {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 6px 0 16px;
}

.mdoc-model-card {
	padding: 16px 18px;
	border: 1px solid #e5e8ea;
	border-radius: 14px;
	background: #ffffff;
	box-shadow: 0 2px 10px rgba(20, 40, 50, 0.04);
}

.mdoc-model-num {
	margin-bottom: 6px;
	color: #0f8fad;
	font-size: 11px;
	font-weight: bold;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.mdoc-model-card h3 {
	margin: 0 0 6px;
	color: #1d2b32;
	font-size: 15px;
}

.mdoc-model-card p {
	margin: 0;
	color: #4b585e;
	font-size: 13.5px;
	line-height: 1.5;
}

.mdoc-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 6px;
}

.mdoc-chip {
	padding: 6px 12px;
	border-radius: 999px;
	background: #eef6f8;
	color: #1d4f5c;
	font-size: 12.5px;
}

/* Компактная полоса «три модели» на странице «О фреймворке» */

.mdoc-about-points {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 2px 0 12px;
}

.mdoc-about-point {
	padding: 10px 14px;
	border: 1px solid #e5e8ea;
	border-radius: 12px;
	background: #ffffff;
	color: #4b585e;
	font-size: 13px;
	line-height: 1.5;
}

.mdoc-about-point strong {
	color: #1d2b32;
}

.mdoc-about-foot {
	margin-top: 14px;
	color: #5d6b72;
	font-size: 13.5px;
	line-height: 1.55;
}

/* ---------- Кнопки ---------- */

.mdoc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 42px;
	padding: 0 20px;
	border: 1px solid #0f8fad;
	border-radius: 10px;
	background: #0f8fad;
	color: #ffffff;
	font-family: Verdana, Geneva, sans-serif;
	font-size: 14px;
	font-weight: bold;
	text-decoration: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.mdoc-article a.mdoc-btn,
.mdoc-article a.mdoc-btn:hover {
	color: #ffffff;
}

.mdoc-article a.mdoc-btn--secondary,
.mdoc-article a.mdoc-btn--secondary:hover {
	color: #0f8fad;
}

.mdoc-btn:hover {
	background: #0b7088;
	border-color: #0b7088;
	color: #ffffff;
}

.mdoc-btn--secondary {
	background: #ffffff;
	color: #0f8fad;
}

.mdoc-btn--secondary:hover {
	background: #eef8fb;
	color: #0b7088;
}

.mdoc-btn--disabled {
	border-color: #e0e5e7;
	background: #eef1f2;
	color: #8a949a;
	cursor: default;
}

.mdoc-btn--disabled:hover {
	background: #eef1f2;
	border-color: #e0e5e7;
	color: #8a949a;
}

/* ---------- Страница «Загрузки» ---------- */

.mdoc-downloads {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin: 24px 0 22px;
}

.mdoc-download-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 22px;
	border: 1px solid #e5e8ea;
	border-radius: 16px;
	background: #ffffff;
	box-shadow: 0 2px 10px rgba(20, 40, 50, 0.05);
}

.mdoc-download-card--soon {
	background: #fafbfb;
}

.mdoc-download-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: #e8f6fa;
	color: #0f8fad;
	font-size: 11px;
	font-weight: bold;
	letter-spacing: 0.08em;
}

.mdoc-download-card h2,
.mdoc-download-card h3 {
	margin: 0;
	color: #1d2b32;
	font-size: 17px;
	line-height: 1.35;
}

.mdoc-download-card p {
	margin: 0;
	color: #4b585e;
	font-size: 13.5px;
	line-height: 1.55;
}

.mdoc-download-meta {
	color: #8a949a;
	font-size: 12.5px;
}

.mdoc-download-card .mdoc-btn {
	align-self: flex-start;
	margin-top: auto;
}

/* ---------- Подвал раздела ---------- */

.docfooter {
	margin: 44px 0 30px;
	padding-top: 18px;
	border-top: 1px solid #e5e8ea;
	color: #6b767c;
	font-family: Verdana, Geneva, sans-serif;
	font-size: 13px;
}

.docfooter-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.docfooter-links {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
}

.docfooter-links a {
	color: #0f8fad;
	text-decoration: none;
}

.docfooter-links a:hover {
	text-decoration: underline;
}

/* ---------- Узкие десктопные экраны ---------- */

@media (max-width: 1100px) {
	.docslayout {
		grid-template-columns: minmax(0, 1fr);
		gap: 22px;
	}

	.docstoc {
		position: static;
		order: -1;
	}

	.docstoc-inner {
		max-height: none;
	}

	.docstoc-list {
		columns: 2;
		column-gap: 26px;
	}

	.docstoc-item {
		break-inside: avoid;
	}

	.mdoc-about-hero {
		gap: 24px;
	}

	.mdoc-downloads {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 860px) {
	.melda-contentpage {
		width: 90%;
	}

	.docstoc-list {
		columns: 1;
	}

	.mdoc-about-hero {
		flex-direction: column;
		align-items: flex-start;
	}

	.mdoc-about-shot {
		flex: none;
		width: 100%;
	}

	.mdoc-models {
		grid-template-columns: minmax(0, 1fr);
	}

	.mdoc-h1 {
		font-size: 28px;
	}

	.mdoc-h2 {
		font-size: 22px;
	}
}
