/* Shared panel look: Telegram promo + site banners */
.ad-panel {
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid #C7D3DE;
	border-left: 3px solid #115098;
	background-color: #F0F4F7;
	border-radius: 3px;
	color: #28313F;
}

/* app.css sets bare h1 to white (header); page titles must stay blue */
h1.index-title,
h1.topic-title,
h1.forum-title {
	color: #115098 !important;
}

/* Banner + Telegram promo row */
.ad-slot {
	display: flex;
	align-items: stretch;
	gap: 10px;
	margin: 8px 0 12px;
	box-sizing: border-box;
	max-width: 100%;
}

.ad-slot--solo {
	display: block;
}

.ad-slot__banner {
	flex: 1 1 auto;
	min-width: 0;
	box-sizing: border-box;
	display: flex;
}

.ad-slot__banner > .ad-panel {
	flex: 1 1 auto;
	width: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.tg-promo {
	flex: 0 0 25%;
	max-width: 25%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	text-decoration: none !important;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ad-slot--solo .tg-promo {
	max-width: none;
	width: 100%;
	flex: none;
}

.tg-promo:hover,
.tg-promo:focus {
	background-color: #E4ECF3;
	border-color: #A9B8C7;
	border-left-color: #0B3D75;
	outline: none;
}

.tg-promo__label {
	display: block;
	font-size: 0.78em;
	font-weight: bold;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #115098;
	margin-bottom: 4px;
}

.tg-promo__title {
	display: block;
	font-size: 1.05em;
	font-weight: bold;
	line-height: 1.3;
	color: #28313F;
	margin-bottom: 4px;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.tg-promo__bot {
	display: block;
	font-size: 0.95em;
	line-height: 1.3;
	color: #115098;
	word-wrap: break-word;
	overflow-wrap: break-word;
	margin-bottom: 6px;
}

.tg-promo__cta {
	display: block;
	font-size: 0.9em;
	color: #536482;
}

.tg-promo:hover .tg-promo__cta,
.tg-promo:focus .tg-promo__cta {
	color: #115098;
}

/* Site banner (text / image) */
.ad-banner__media {
	overflow: hidden;
	line-height: 0;
	text-align: center;
}

.ad-banner__media img {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

.ad-banner__text {
	font-size: 1.4em;
	line-height: 1.45;
	color: #28313F;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.ad-banner__media + .ad-banner__text {
	margin-top: 8px;
}

.ad-banner--text .ad-banner__text {
	font-size: 1.4em;
	line-height: 1.45;
}

.ad-banner__text a {
	color: #105289;
}

.ad-banner__text a:hover {
	color: #D31141;
}

.ad-banner__text p:first-child {
	margin-top: 0;
}

.ad-banner__text p:last-child {
	margin-bottom: 0;
}

/* Telegram help page */
.tg-help,
.tg-help-step,
.tg-help-footer {
	margin-bottom: 14px;
	padding: 12px 14px;
}

.tg-help__lead {
	margin: 0 0 8px;
	font-size: 1.05em;
	line-height: 1.5;
	color: #28313F;
}

.tg-help__note {
	margin: 0;
	color: #536482;
	line-height: 1.45;
}

.tg-help-step .inner {
	display: flex;
	gap: 14px;
	align-items: flex-start;
}

.tg-help-step__num {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	line-height: 28px;
	text-align: center;
	border-radius: 50%;
	background: #115098;
	color: #fff;
	font-weight: bold;
	font-size: 0.95em;
}

.tg-help-step__body {
	flex: 1 1 auto;
	min-width: 0;
}

.tg-help-step__body h3 {
	margin: 2px 0 8px;
	color: #115098;
}

.tg-help-step__body p {
	margin: 0 0 8px;
	line-height: 1.5;
	color: #28313F;
}

.tg-help-step__body p:last-child {
	margin-bottom: 0;
}

.tg-help-step__hint,
.tg-help-step__path {
	color: #536482 !important;
}

.tg-help-step__path {
	padding: 8px 10px;
	background: #F0F4F7;
	border: 1px solid #D6DEE6;
	border-radius: 3px;
}

.tg-help-step__actions {
	margin-top: 10px !important;
}

.tg-help-footer p {
	margin: 0;
	line-height: 1.5;
	color: #536482;
}

@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) {
	.ad-slot {
		flex-direction: column;
		gap: 8px;
		margin: 6px 0 10px;
	}

	.tg-promo {
		order: 2;
		flex: none;
		max-width: none;
		width: 100%;
	}

	.ad-panel {
		padding: 9px 11px;
	}

	.ad-slot__banner {
		order: 1;
		width: 100%;
	}

	.tg-promo__title {
		font-size: 1em;
	}

	.tg-help,
	.tg-help-step,
	.tg-help-footer {
		margin-bottom: 12px;
		padding: 10px 12px;
	}

	.tg-help-step .inner {
		gap: 10px;
	}

	.tg-help-step__num {
		width: 24px;
		height: 24px;
		line-height: 24px;
		font-size: 0.88em;
	}
}

/* Site announcement — above banners, conservative forum look */
.site-announcement {
	margin: 8px 0 10px;
	border: 1px solid #C7D3DE;
	border-left: 3px solid #115098;
	background-color: #F0F4F7;
	border-radius: 3px;
	color: #28313F;
	box-sizing: border-box;
	max-width: 100%;
}

.site-announcement__inner {
	padding: 8px 12px;
}

.site-announcement__title {
	display: block;
	font-size: 1.15em;
	font-weight: bold;
	line-height: 1.35;
	color: #115098;
	margin: 0 0 4px;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.site-announcement__text {
	font-size: 1em;
	line-height: 1.45;
	color: #536482;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.site-announcement__title:only-child,
.site-announcement__text:only-child {
	margin-bottom: 0;
}

@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) {
	.site-announcement {
		margin: 6px 0 8px;
	}

	.site-announcement__inner {
		padding: 7px 10px;
	}

	.site-announcement__title {
		font-size: 1.05em;
		margin-bottom: 3px;
	}

	.site-announcement__text {
		font-size: 0.95em;
		line-height: 1.4;
	}
}

/* Cabinet founder admin layout */
.cabinet-admin-lead {
	margin: 0 0 14px;
	color: #536482;
	line-height: 1.45;
}

.cabinet-admin-panel {
	margin-bottom: 18px;
}

.cabinet-admin-heading {
	margin: 0 0 14px;
	padding-bottom: 8px;
	border-bottom: 1px solid #C7D3DE;
	clear: both;
}

.cabinet-admin-label {
	margin: 0 0 8px;
	font-weight: bold;
	color: #28313F;
}

.cabinet-admin-hint {
	font-weight: normal;
	color: #6A7685;
	font-size: 0.92em;
}

.cabinet-admin-preview {
	margin: 0 0 12px;
	padding: 10px;
	background: #fff;
	border: 1px solid #D6DEE6;
	border-radius: 3px;
	min-height: 40px;
}

.cabinet-admin-preview--sm {
	padding: 8px;
	margin-bottom: 10px;
}

.cabinet-admin-preview img {
	max-width: 100%;
	height: auto;
}

.cabinet-admin-empty {
	margin: 0;
	color: #6A7685;
	font-style: italic;
}

.cabinet-admin-status {
	margin: 0 0 12px;
	color: #536482;
}

.cabinet-admin-form p {
	margin: 0 0 10px;
}

.cabinet-admin-form--box {
	padding: 12px;
	background: #fff;
	border: 1px solid #D6DEE6;
	border-radius: 3px;
}

.cabinet-admin-card {
	margin: 0 0 14px;
	padding: 12px;
	background: #fff;
	border: 1px solid #D6DEE6;
	border-radius: 3px;
}

.cabinet-admin-card__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid #E6E9ED;
	color: #536482;
}

.cabinet-admin-card__head strong {
	color: #28313F;
}

.cabinet-admin-card__actions {
	margin-left: auto;
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
	align-items: center;
}

.cabinet-admin-inline {
	display: inline;
	margin: 0;
}

.cabinet-admin-panel .clear {
	clear: both;
	height: 0;
	overflow: hidden;
}

@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) {
	.cabinet-admin-panel .column1,
	.cabinet-admin-panel .column2 {
		float: none;
		width: auto;
		margin-bottom: 16px;
	}

	.cabinet-admin-card__actions {
		margin-left: 0;
		width: 100%;
	}
}
