/*
 * TryDota theme — recreation of the 2020–2022 trydota.com template
 * (ModularAdmin "app-orange" + dark Bootstrap 3 customisation).
 */

/* ---------- Tokens ---------- */
:root {
	--td-bg-app: #1e2222;
	--td-bg-body: #2a2d2d;
	--td-bg-header: #141616;
	--td-bg-sidebar: #232626;
	--td-bg-card: #2a2d2d;
	--td-bg-head: #333939;
	--td-bg-sub: #323737;
	--td-bg-inset: #1e2222;
	--td-border: #333939;
	--td-border-dark: #313131;
	--td-text: #999b9d;
	--td-muted: #999999;
	--td-muted-2: #666969;
	--td-accent: #ec4f00;
	--td-accent-2: #fe821d;
	--td-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--td-sidebar-w: 230px;
	--td-header-h: 70px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

html,
body {
	margin: 0;
	padding: 0;
	min-height: 100%;
}

body {
	font-family: var(--td-font);
	font-size: 16px;
	line-height: 1.5;
	color: var(--td-text);
	background-color: var(--td-bg-body);
	overflow-x: hidden;
}

a {
	color: var(--td-accent);
	text-decoration: none;
	transition: color .3s;
}

a:hover,
a:focus {
	color: var(--td-accent-2);
}

img {
	max-width: 100%;
	height: auto;
	border: 0;
	vertical-align: middle;
}

p {
	margin: 0 0 10px;
}

h1, h2, h3, h4, h5, h6 {
	font-family: inherit;
	font-weight: 500;
	line-height: 1.1;
	color: inherit;
	margin: 20px 0 10px;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
h5, h6 { font-size: 1rem; }

b,
strong {
	font-weight: 700;
}

hr {
	height: 0;
	margin: 20px 0;
	border: 0;
	border-top: 1px solid var(--td-border);
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}

td,
th {
	padding: 0;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

:focus-visible {
	outline: 2px solid var(--td-accent-2);
	outline-offset: 1px;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
	top: 8px;
	left: 8px;
	z-index: 100000;
	padding: 10px 16px;
	background: var(--td-accent);
	color: #fff;
}

.pull-right { float: right; }
.clearfix::after { content: ""; display: table; clear: both; }
.list-unstyled { padding-left: 0; list-style: none; margin: 0; }

.list-inline {
	padding-left: 0;
	margin: 0 0 0 -5px;
	list-style: none;
}

.list-inline > li {
	display: inline-block;
	padding: 0 5px;
}

.td-muted {
	color: var(--td-muted);
	margin: 0;
}

/* ---------- App shell ---------- */
.main-wrapper {
	width: 100%;
	min-height: 100%;
}

.app {
	position: relative;
	width: 100%;
	min-height: 100vh;
	padding-left: var(--td-sidebar-w);
	background-color: var(--td-bg-app);
	transition: left .3s ease, padding-left .3s ease;
	overflow: hidden;
}

.app .content {
	display: block;
	padding: 85px 15px 85px;
	min-height: 100vh;
}

/* Header */
.header {
	position: absolute;
	top: 0;
	left: var(--td-sidebar-w);
	right: 0;
	height: var(--td-header-h);
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background-color: var(--td-bg-header);
	border-bottom: 1px solid var(--td-border-dark);
	transition: left .3s ease;
}

.header .header-block-collapse {
	display: none;
	align-items: center;
	padding-right: 5px;
	flex: 0 0 auto;
}

.header .collapse-btn {
	background: none;
	border: 0;
	box-shadow: none;
	color: var(--td-accent);
	font-size: 24px;
	line-height: 40px;
	border-radius: 0;
	padding: 0 10px;
	cursor: pointer;
}

.header-brand {
	display: none;
	align-items: center;
	color: var(--td-accent);
	font-size: 16px;
	white-space: nowrap;
}

.header-brand:hover,
.header-brand:focus {
	color: var(--td-accent);
}

.header .header-block-search {
	margin-right: auto;
	padding-left: 35px;
	min-width: 0;
}

.search-form .input-container {
	position: relative;
	display: flex;
	align-items: center;
	color: var(--td-text);
}

.search-form .input-container .fa-search {
	position: absolute;
	left: 0;
	top: 0;
	height: 40px;
	line-height: 40px;
	color: var(--td-muted-2);
	pointer-events: none;
}

.search-form input[type="search"] {
	background-color: transparent;
	border: 0;
	margin-left: 25px;
	height: 40px;
	width: 100%;
	max-width: 152px;
	color: var(--td-text);
	font-size: 16px;
	padding: 0;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}

.search-form input[type="search"]::placeholder {
	color: var(--td-muted-2);
	opacity: 1;
}

.search-form input[type="search"]::-webkit-search-cancel-button {
	filter: grayscale(1) brightness(.6);
}

.search-form .underline {
	position: absolute;
	left: 25px;
	right: 0;
	bottom: 0;
	height: 1px;
	background-color: var(--td-accent-2);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .3s ease;
}

.search-form input[type="search"]:focus + .underline {
	transform: scaleX(1);
}

/* In-page search variant */
.search-form--inline {
	margin: 0 0 10px;
}

.search-form--inline .input-container {
	background: var(--td-bg-inset);
	border: 1px solid var(--td-border);
	padding-left: 12px;
}

.search-form--inline .input-container .fa-search {
	left: 12px;
}

.search-form--inline input[type="search"] {
	max-width: none;
	flex: 1 1 auto;
	margin-left: 22px;
	padding-right: 10px;
}

.search-form--inline .underline {
	left: 0;
}

.search-form--inline .btn {
	flex: 0 0 auto;
	margin: 0;
	height: 40px;
	border-radius: 0;
}

/* Sidebar */
.sidebar {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	width: var(--td-sidebar-w);
	padding-bottom: 60px;
	background-color: var(--td-bg-sidebar);
	z-index: 20;
	transition: left .3s ease;
}

.sidebar .sidebar-container {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	overflow-x: hidden;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #444a4a var(--td-bg-body);
}

.sidebar .sidebar-container::-webkit-scrollbar { width: 6px; }
.sidebar .sidebar-container::-webkit-scrollbar-track { background-color: var(--td-bg-body); }
.sidebar .sidebar-container::-webkit-scrollbar-thumb { background-color: #444a4a; }

.sidebar-header .brand {
	display: block;
	height: var(--td-header-h);
	line-height: 69px;
	text-align: center;
	font-size: 16px;
	color: var(--td-accent);
	background: var(--td-bg-header);
	border-bottom: 1px solid var(--td-border-dark);
	white-space: nowrap;
}

.sidebar-header .brand:hover,
.sidebar-header .brand:focus {
	color: var(--td-accent);
}

.logo {
	display: inline-block;
	position: relative;
	width: 25px;
	height: 25px;
	margin: -4px 5px 0 0;
	vertical-align: middle;
	background: url(../images/logo-orange.png) no-repeat center / 25px 25px;
}

.sidebar .nav {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 14px;
	line-height: 1.5;
}

.sidebar .nav li {
	position: relative;
	display: block;
}

.sidebar .nav a {
	display: block;
	position: relative;
	color: rgba(255, 255, 255, .5);
	text-decoration: none;
	transition: none;
}

.sidebar .nav a:hover,
.sidebar .nav a:focus-visible {
	color: #fff;
	background-color: var(--td-accent);
}

.sidebar .nav > li > a {
	padding: 15px 10px 15px 20px;
}

.sidebar .nav > li.menu-item-has-children > a {
	padding-right: 40px;
}

.sidebar .nav > li > a > .fa {
	width: 15px;
	margin-right: 5px;
	font-size: 16px;
	text-align: center;
}

.sidebar .nav > li.active > a {
	color: #fff;
}

.sidebar .nav > li.open > a,
.sidebar .nav > li.open > a:hover {
	color: #fff;
	background-color: var(--td-accent);
}

/* Expand arrow (inside '#'-links) and toggle button (for parents with their own URL) */
.sidebar .nav .arrow {
	position: absolute;
	right: 15px;
	top: 50%;
	width: auto;
	margin: -10px 0 0;
	font-size: 20px;
	line-height: 20px;
	transition: transform .3s ease;
}

.sidebar .nav .arrow::before {
	content: "\f105";
}

.sidebar .nav li.open > a .arrow,
.sidebar .nav li.open > .submenu-toggle .arrow {
	transform: rotate(90deg);
}

.sidebar .submenu-toggle {
	position: absolute;
	top: 0;
	right: 0;
	width: 44px;
	height: 51px;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	color: rgba(255, 255, 255, .5);
	cursor: pointer;
}

.sidebar .submenu-toggle .arrow {
	right: 15px;
}

.sidebar .nav > li:hover > .submenu-toggle,
.sidebar .nav > li.open > .submenu-toggle,
.sidebar .submenu-toggle:focus-visible {
	color: #fff;
}

.sidebar .nav .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	display: none;
}

.sidebar .nav li.open > .sub-menu,
.sidebar .nav .sub-menu.is-animating {
	display: block;
}

.sidebar .nav .sub-menu a {
	padding: 10px 10px 10px 50px;
	background-color: var(--td-bg-sub);
}

.sidebar .nav .sub-menu .sub-menu a {
	padding-left: 65px;
}

.sidebar .nav .sub-menu li.active > a {
	color: #fff;
}

.sidebar .nav .sub-menu a:hover,
.sidebar .nav .sub-menu a:focus-visible {
	color: #fff;
	background-color: var(--td-accent);
}

.sidebar-overlay {
	position: fixed;
	display: none;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 15;
	background-color: rgba(0, 0, 0, .7);
	opacity: 0;
	transition: opacity .3s ease;
}

/* Footer */
.footer {
	position: absolute;
	left: var(--td-sidebar-w);
	right: 0;
	bottom: 0;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	background-color: var(--td-bg-body);
}

.footer .footer-block {
	margin: 0 20px;
}

.footer .footer-block.contact a {
	color: var(--td-text);
	white-space: nowrap;
}

.footer .footer-block.contact a:hover {
	color: var(--td-accent-2);
}

.footer .footer-block.contact .fa {
	color: var(--td-accent);
	margin-right: 3px;
}

@media (max-width: 479px) {
	.footer .footer-block {
		margin: 0 10px;
	}

	.footer .contact-label {
		display: none;
	}
}

/* ---------- Layout ---------- */
.td-layout {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;
}

.td-main {
	flex: 0 0 calc(75% - 3.75px);
	max-width: calc(75% - 3.75px);
	min-width: 0;
}

.td-aside {
	flex: 0 0 calc(25% - 11.25px);
	max-width: calc(25% - 11.25px);
	min-width: 0;
}

/* ---------- Cards & panels ---------- */
.card,
.panel {
	position: relative;
	display: block;
	margin: 0 0 15px;
	background-color: var(--td-bg-card);
	border: 1px solid var(--td-border);
	border-radius: 0;
}

.card-header {
	display: flex;
	align-items: center;
	background-color: var(--td-bg-head);
}

.card-header .header-block {
	padding: 10px 15px;
	width: 100%;
	min-width: 0;
}

.card-block {
	padding: 15px;
}

.card-footer {
	padding: 5px 0;
	background-color: var(--td-bg-card);
	border-top: 1px solid var(--td-border);
	border-radius: 0 0 3px 3px;
}

.card-footer::after {
	content: "";
	display: table;
	clear: both;
}

.panel-heading {
	display: block;
	margin: 0;
	padding: 10px 15px;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--td-muted);
	background-color: var(--td-bg-head);
	border-bottom: 1px solid var(--td-border);
}

.panel-title {
	margin: 0;
	font-size: 1.3rem;
	font-weight: 400;
	line-height: 1.5;
	color: var(--td-text);
}

.panel-body {
	padding: 15px;
}

.panel-body::after {
	content: "";
	display: table;
	clear: both;
}

.panel-footer {
	padding: 10px 15px;
	background-color: var(--td-bg-head);
	border-top: 1px solid var(--td-border);
}

h1.g22,
.g22 {
	margin: 0;
	font-size: 1.3rem;
	font-weight: 400;
	line-height: 1.1;
	color: var(--td-text);
	overflow-wrap: anywhere;
}

/* Buttons */
.btn {
	display: inline-block;
	padding: 6px 12px;
	margin: 0;
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
	text-align: center;
	white-space: nowrap;
	vertical-align: middle;
	cursor: pointer;
	user-select: none;
	border: 1px solid transparent;
	border-radius: 0;
	transition: .3s;
}

.btn-secondary {
	color: var(--td-text);
	background-color: var(--td-bg-card);
	border-color: var(--td-border);
}

.btn-secondary:hover,
.btn-secondary:focus {
	color: #fff;
	background-color: var(--td-bg-head);
	border-color: var(--td-bg-head);
}

.btn-primary {
	color: #fff;
	background-color: var(--td-accent);
	border-color: transparent;
	text-transform: uppercase;
}

.btn-primary:hover,
.btn-primary:focus {
	color: #fff;
	background-color: var(--td-accent-2);
}

.label {
	display: inline-block;
	padding: .2em .6em .3em;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	color: #fff;
	text-align: center;
	white-space: nowrap;
	vertical-align: baseline;
}

.label-primary {
	background-color: var(--td-accent);
}

/* ---------- Listing card ---------- */
.td-card__row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
}

.td-card__thumb {
	flex: 0 0 calc(33.3333% - 10px);
	max-width: calc(33.3333% - 10px);
	text-align: center;
}

.td-card__thumb a {
	position: relative;
	display: block;
}

.td-card__thumb img {
	display: block;
	margin: 0 auto;
	max-width: 100%;
	height: auto;
}

.td-card__thumb .td-thumb--placeholder {
	width: 100%;
	max-width: 255px;
	aspect-ratio: 16 / 9;
	object-fit: contain;
	background-color: var(--td-bg-inset);
}

.td-card__play {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	font-size: 48px;
	line-height: 1;
	color: rgba(255, 255, 255, .85);
	text-shadow: 0 0 12px rgba(0, 0, 0, .8);
	pointer-events: none;
}

.td-card__thumb a:hover .td-card__play {
	color: var(--td-accent);
}

.td-card__body {
	flex: 0 0 calc(66.6667% - 5px);
	max-width: calc(66.6667% - 5px);
	min-width: 0;
}

.short-title {
	margin: 0;
	font-size: 22px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--td-text);
	overflow-wrap: anywhere;
}

.short-title a {
	color: var(--td-text);
	text-decoration: none;
	transition: all .3s ease;
}

.short-title a:hover,
.short-title a:focus {
	color: var(--td-accent);
}

.td-card__excerpt {
	overflow-wrap: anywhere;
}

.td-card__more {
	float: right;
	margin-right: 5px;
}

.td-meta {
	margin-top: 5px;
	color: var(--td-muted);
	font-size: 14px;
	line-height: 1.7;
}

.td-meta > li:first-child {
	padding-left: 10px;
}

.td-meta .fa {
	margin-right: 1px;
}

.linka,
.linka2 {
	font-size: 14px;
	font-weight: 700;
}

.linka a,
.linka2 a {
	color: var(--td-text);
	text-decoration: none;
	transition: .3s;
}

.linka a:hover,
.linka2 a:hover,
.linka a:focus,
.linka2 a:focus {
	color: #f50;
}

.td-meta .linka2 {
	font-weight: 400;
}

/* Archive heading */
.td-archive-head .header-block {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 5px 15px;
}

.td-archive-head__count {
	font-size: 14px;
	color: var(--td-muted);
}

.td-archive-head__desc > :last-child,
.td-archive-head__search .search-form {
	margin-bottom: 0;
}

.td-empty__home {
	margin: 10px 0 0;
}

/* ---------- Pagination ---------- */
.td-pagination {
	text-align: center;
	margin: 0 0 15px;
}

.pagination {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	padding: 0;
	margin: 16px 0;
	list-style: none;
	border-radius: 4px;
	background-color: var(--td-bg-card);
}

.pagination > li > a,
.pagination > li > span {
	position: relative;
	display: block;
	padding: 6px 12px;
	margin-left: -1px;
	line-height: 1.42857143;
	color: var(--td-text);
	text-decoration: none;
	background-color: var(--td-bg-card);
	border: 1px solid var(--td-bg-card);
}

.pagination > li:first-child > a,
.pagination > li:first-child > span {
	margin-left: 0;
	border-radius: 4px 0 0 4px;
}

.pagination > li:last-child > a,
.pagination > li:last-child > span {
	border-radius: 0 4px 4px 0;
}

.pagination > li > a:hover,
.pagination > li > a:focus {
	z-index: 2;
	color: var(--td-text);
	background-color: var(--td-bg-head);
	border-color: var(--td-bg-head);
}

.pagination > li.active > span {
	color: var(--td-accent);
}

.pagination > li.disabled > span {
	color: var(--td-muted-2);
	cursor: default;
}

/* ---------- Single ---------- */
.td-single .card-header h1 {
	margin: 0;
}

.td-single__footer {
	padding: 5px;
	display: flex;
	flex-direction: row-reverse;
	align-items: center;
	justify-content: space-between;
	gap: 5px 10px;
	flex-wrap: wrap;
}

.td-single__footer::after {
	content: none;
}

.td-tags {
	margin: 0;
	font-size: 14px;
	line-height: 1.7;
	color: var(--td-muted);
}

.td-tags .linka2 {
	font-weight: 400;
}

.td-video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
}

.td-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Tabs */
.with-nav-tabs > .panel-heading {
	padding: 5px 5px 0;
}

.nav-tabs {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
	border-bottom: 0;
}

.nav-tabs > li {
	margin-bottom: -1px;
}

.nav-tabs > li > a {
	display: block;
	margin-right: 2px;
	padding: 10px 15px;
	line-height: 1.42857143;
	color: var(--td-muted);
	border: 1px solid transparent;
	border-bottom: 0;
	text-decoration: none;
}

.nav-tabs > li > a:hover,
.nav-tabs > li > a:focus,
.nav-tabs > li.active > a {
	color: var(--td-muted);
	background-color: var(--td-bg-card);
	border-color: var(--td-bg-card);
}

.td-tabs__count {
	display: inline-block;
	min-width: 20px;
	padding: 0 6px;
	margin-left: 2px;
	font-size: 12px;
	line-height: 18px;
	text-align: center;
	color: #fff;
	background: var(--td-accent);
	border-radius: 9px;
	vertical-align: 1px;
}

/* Without JS every pane is visible, stacked. */
.js .td-tabs .tab-pane {
	display: none;
}

.js .td-tabs .tab-pane.active {
	display: block;
}

html:not(.js) .td-tabs .nav-tabs {
	display: none;
}

html:not(.js) .td-tabs .tab-pane + .tab-pane {
	margin-top: 20px;
	padding-top: 15px;
	border-top: 1px solid var(--td-border);
}

/* Info tab */
.td-info {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 15px 15px;
	align-items: start;
}

.td-info__item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	min-width: 0;
	line-height: 1.5;
}

.td-info__body {
	padding-top: 6px;
	min-width: 0;
	overflow-wrap: anywhere;
}

.icnbg {
	padding: 3px;
	color: var(--td-text);
}

.fa-3x {
	font-size: 3em;
}

.tosh-h4-fullnews {
	margin: 0 0 5px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.1;
}

.td-info__item--stats li {
	white-space: nowrap;
}

.fabl2 {
	font-size: 20px;
	width: 22px;
	text-align: center;
}

/* Related tab */
.td-related {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0 30px;
}

.td-related__item {
	margin-bottom: 5px;
}

.td-related__item .panel-body {
	position: relative;
	padding: 5px;
}

.td-related__item .label {
	position: absolute;
	top: 5px;
	left: 5px;
	z-index: 1;
}

.td-related__item img {
	display: block;
	width: 100%;
	height: 100px;
	object-fit: cover;
}

.td-related__item img.td-thumb--placeholder {
	object-fit: contain;
	background: var(--td-bg-inset);
}

.td-related__item .panel-footer {
	min-height: 62px;
	font-size: 14px;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

/* ---------- Comments ---------- */
.comments-tree-list,
.comments-tree-list .children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comments-tree-list .children {
	padding-left: 30px;
}

.td-comment {
	display: flex;
	align-items: flex-start;
	gap: 22px;
}

.td-comment__avatar {
	flex: 0 0 auto;
	padding: 4px;
	background-color: var(--td-bg-card);
	border: 1px solid var(--td-border);
}

.td-comment__avatar img {
	display: block;
	width: 45px;
	height: 45px;
	object-fit: cover;
}

.td-comment__main {
	flex: 1 1 auto;
	min-width: 0;
}

.panel-danger > .panel-heading {
	padding: 5px;
	background-color: var(--td-bg-head);
	color: var(--td-text);
	font-size: 16px;
}

.panel-danger > .panel-heading::before,
.panel-danger > .panel-heading::after {
	position: absolute;
	top: 11px;
	right: 100%;
	width: 0;
	height: 0;
	display: block;
	content: " ";
	border-color: transparent;
	border-style: solid;
	pointer-events: none;
}

.panel-danger > .panel-heading::before {
	border-width: 8px;
	border-right-color: var(--td-bg-head);
}

.panel-danger > .panel-heading::after {
	border-width: 7px;
	border-right-color: var(--td-bg-head);
	margin-top: 1px;
}

.td-comment__author {
	font-size: 13px;
	font-weight: 700;
	color: var(--td-text);
	margin-right: 4px;
}

.text-muted {
	font-size: 12px;
	color: var(--td-muted);
}

.td-comment__moderation {
	display: block;
	font-size: 12px;
	color: var(--td-accent);
}

.td-comment__text {
	padding: 5px;
	overflow-wrap: anywhere;
}

.td-comment__text p:last-child {
	margin-bottom: 0;
}

.td-comment__reply {
	margin-top: 5px;
	font-size: 13px;
}

.td-comments__closed {
	margin-top: 5px;
	font-size: 14px;
}

.td-comments .navigation.comments-pagination {
	margin: 10px 0;
	font-size: 14px;
}

.td-comments .comments-pagination .nav-links > * {
	margin-right: 8px;
}

/* Comment form (only when comments are open) */
.comment-respond {
	margin-top: 15px;
}

.comment-reply-title {
	margin: 0 0 10px;
	font-size: 18px;
}

.comment-form label {
	display: block;
	font-size: 14px;
	margin-bottom: 4px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	display: block;
	width: 100%;
	padding: 6px 10px;
	color: var(--td-text);
	background: var(--td-bg-inset);
	border: 1px solid var(--td-border);
	border-radius: 0;
}

.comment-form input:focus,
.comment-form textarea:focus {
	border-color: var(--td-accent-2);
	outline: none;
}

.comment-form .comment-notes,
.comment-form .logged-in-as {
	font-size: 13px;
	color: var(--td-muted);
}

.comment-form-cookies-consent label {
	display: inline;
}

/* ---------- Static pages ---------- */
.td-page > .panel-heading {
	padding: 10px 15px;
}

.td-page .panel-title {
	font-size: 1.3rem;
	line-height: 1.5;
}

.td-404__code {
	font-size: 72px;
	line-height: 1;
	font-weight: 700;
	color: var(--td-accent);
	margin: 0 0 10px;
}

/* ---------- Right column ---------- */
.td-widget > .panel-heading {
	font-size: 16px;
}

.td-widget--comments > .panel-body {
	padding: 5px 5px 0;
}

.td-lc {
	display: block;
	margin-bottom: 5px;
	color: var(--td-text);
	text-decoration: none;
	background-color: var(--td-bg-card);
	border: 1px solid var(--td-border);
}

.td-lc:hover,
.td-lc:focus {
	color: var(--td-text);
	border-color: #3d4444;
}

.td-lc__text {
	display: block;
	padding: 5px;
	font-size: 13px;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.td-lc:hover .td-lc__text {
	color: #c3c5c7;
}

.td-lc__footer {
	display: flex;
	flex-direction: row-reverse;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	padding: 3px 6px;
	background-color: var(--td-bg-head);
}

.td-lc__date {
	flex: 0 0 auto;
	font-size: 11px;
	color: var(--td-muted);
}

.td-lc__author {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 12px;
	font-weight: 700;
	color: var(--td-muted);
}

.td-lc__author img {
	width: 18px;
	height: 18px;
	margin: -2px 2px 0 -5px;
	object-fit: cover;
}

.td-widget--popular > .panel-body {
	padding: 5px;
}

.td-pop {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	padding: 5px;
	color: var(--td-text);
	text-decoration: none;
}

.td-pop + .td-pop {
	border-top: 1px solid var(--td-border);
}

.td-pop:hover,
.td-pop:focus {
	color: var(--td-text);
	background-color: #2f3333;
}

.td-pop__img {
	flex: 0 0 72px;
	width: 72px;
	height: 50px;
	object-fit: cover;
	background: var(--td-bg-inset);
}

.td-pop__img.td-thumb--placeholder {
	object-fit: contain;
}

.td-pop__body {
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.td-pop__title {
	font-size: 13px;
	line-height: 1.4;
	font-weight: 700;
	overflow-wrap: anywhere;
	transition: color .3s;
}

.td-pop:hover .td-pop__title {
	color: #f50;
}

.td-pop__views {
	margin-top: 2px;
	font-size: 12px;
	color: var(--td-muted);
}

/* ---------- Post content (legacy DLE HTML) ---------- */
.entry-content {
	overflow-wrap: break-word;
}

/* Wrappers kept from the old templates inside imported content. */
.entry-content .card-block,
.entry-content .full-content,
.entry-content .static-ct {
	padding: 0;
	margin: 0;
	background: none;
	border: 0;
}

.entry-content::after {
	content: "";
	display: table;
	clear: both;
}

.entry-content img,
.entry-content video,
.entry-content embed,
.entry-content object {
	max-width: 100%;
	height: auto;
}

.entry-content div,
.entry-content p,
.entry-content span,
.entry-content center {
	max-width: 100%;
}

.entry-content iframe {
	max-width: 100%;
	border: 0;
}

/* Video embeds keep their original width (capped to the column) and a 16:9 box. */
.entry-content iframe.td-embed[src*="youtube"],
.entry-content iframe.td-embed[src*="youtu.be"],
.entry-content iframe.td-embed[src*="vk.com"],
.entry-content iframe.td-embed[src*="twitch"] {
	height: auto;
	aspect-ratio: 16 / 9;
}

.entry-content iframe.td-embed:not([width]) {
	width: 100%;
}

.entry-content ul,
.entry-content ol {
	padding-left: 30px;
	margin: 0 0 10px;
}

.entry-content li > ul,
.entry-content li > ol,
.entry-content ul ul,
.entry-content ol ol,
.entry-content ul ol,
.entry-content ol ul {
	margin-bottom: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	color: #b5b7b9;
}

.entry-content pre,
.entry-content code {
	font-family: SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	font-size: 14px;
	background: var(--td-bg-inset);
}

.entry-content pre {
	padding: 10px;
	overflow: auto;
}

.td-table-wrap {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-bottom: 10px;
}

.td-table-wrap > table {
	margin: 0;
}

.entry-content table {
	max-width: none;
}

.entry-content td,
.entry-content th {
	vertical-align: top;
}

.entry-content td[valign="middle"] { vertical-align: middle; }
.entry-content td[valign="bottom"] { vertical-align: bottom; }

.quote,
.entry-content blockquote {
	margin: 1em 0;
	padding: 10px;
	font-style: italic;
	background: var(--td-bg-inset);
	border-left: 2px solid #f50;
}

.quote > :last-child,
.entry-content blockquote > :last-child {
	margin-bottom: 0;
}

.title_quote {
	margin-top: 2px;
	font-weight: 700;
}

/* DLE spoilers */
.title_spoiler,
.text_spoiler {
	padding: 6px 12px;
	background: var(--td-bg-inset);
	border: 1px solid var(--td-border);
}

.title_spoiler {
	margin-top: 2px;
	font-weight: 400;
	cursor: pointer;
	user-select: none;
}

.title_spoiler img {
	display: none;
}

.title_spoiler::before {
	content: "\f196";
	display: inline-block;
	width: 18px;
	font-family: FontAwesome;
	color: var(--td-accent);
}

.title_spoiler.is-open::before {
	content: "\f147";
}

.text_spoiler {
	margin-bottom: 2px;
	border-top: 0;
	text-align: justify;
}

.js .text_spoiler:not(.is-open) {
	display: none;
}

.text_spoiler.is-open {
	display: block !important;
}

/* Froala (DLE editor) image classes */
img.fr-dib {
	display: block;
	float: none;
	margin: 5px auto;
	vertical-align: top;
}

img.fr-dib.fr-fil { margin-left: 0; }
img.fr-dib.fr-fir { margin-right: 0; }

img.fr-dii {
	display: inline-block;
	float: none;
	vertical-align: bottom;
	margin-left: 5px;
	margin-right: 5px;
	max-width: calc(100% - 10px);
}

img.fr-dii.fr-fil {
	float: left;
	margin: 5px 5px 5px 0;
	max-width: calc(100% - 5px);
}

img.fr-dii.fr-fir {
	float: right;
	margin: 5px 0 5px 5px;
	max-width: calc(100% - 5px);
}

.fr-video {
	position: relative;
	text-align: center;
}

.fr-video.fr-dvb {
	display: block;
	clear: both;
}

.fr-video.fr-dvi {
	display: inline-block;
}

.flex-video {
	position: relative;
	aspect-ratio: 16 / 9;
	margin-bottom: 10px;
}

.flex-video iframe,
.flex-video object,
.flex-video embed {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

/* WordPress alignment classes */
.alignleft {
	float: left;
	margin: 5px 15px 10px 0;
}

.alignright {
	float: right;
	margin: 5px 0 10px 15px;
}

.aligncenter {
	display: block;
	margin: 5px auto 10px;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text,
.gallery-caption {
	font-size: 13px;
	color: var(--td-muted);
	text-align: center;
}

.td-page-links {
	margin-top: 15px;
	font-size: 14px;
}

.td-page-links a,
.td-page-links > span {
	display: inline-block;
	padding: 2px 8px;
	margin-left: 4px;
	background: var(--td-bg-head);
}

/* ---------- Responsive ---------- */
@media (min-width: 1200px) {
	.header .header-block-search {
		padding-left: 35px;
	}
}

@media (max-width: 1199px) {
	.header .header-block-search {
		padding-left: 20px;
	}
}

@media (max-width: 991px) {
	.app {
		padding-left: 0;
	}

	.header {
		left: 0;
	}

	.header .header-block-collapse,
	.header-brand {
		display: flex;
	}

	.header .header-block-search {
		margin-left: auto;
		margin-right: 0;
		padding-right: 15px;
	}

	.sidebar {
		left: calc(-1 * var(--td-sidebar-w));
	}

	.sidebar-open .sidebar {
		left: 0;
	}

	.sidebar-overlay {
		display: block;
		visibility: hidden;
	}

	.sidebar-open .sidebar-overlay {
		visibility: visible;
		opacity: 1;
	}

	.footer {
		left: 0;
	}

	.td-main,
	.td-aside {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.td-card__thumb,
	.td-card__body {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.short-title {
		margin-top: 10px;
	}

	.td-related {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 767px) {
	:root {
		--td-header-h: 50px;
	}

	.app .content {
		padding: 65px 10px 70px;
	}

	.header .header-block {
		padding: 5px;
	}

	.header .header-block-search {
		padding-right: 10px;
	}

	.search-form--header input[type="search"] {
		max-width: 140px;
	}

	.sidebar-header .brand {
		line-height: 49px;
	}

	.card-block {
		padding: 10px;
	}

	.short-title {
		font-size: 20px;
		line-height: 1.4;
	}

	.td-info {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nav-tabs > li > a {
		padding: 8px 10px;
		font-size: 15px;
	}

	.pagination > li.page-num {
		display: none;
	}

	.pagination > li.page-num.active {
		display: block;
	}

	.td-comment {
		gap: 0;
	}

	.td-comment__avatar {
		display: none;
	}

	.panel-danger > .panel-heading::before,
	.panel-danger > .panel-heading::after {
		display: none;
	}

	.comments-tree-list .children {
		padding-left: 15px;
	}

	.entry-content img[style*="float"],
	.entry-content img[align] {
		max-width: 50%;
	}

	/* Wide multi-column tables (hero stats, creep camps): keep them readable
	   and let them scroll sideways instead of squeezing. */
	.td-table-wrap--wide > table {
		min-width: 560px;
	}

	/* Old layout tables indent cells with large fixed paddings (120px+). */
	.entry-content td[style*="padding-left"] {
		padding-left: 8px !important;
	}

	.td-table-wrap {
		scrollbar-width: thin;
		scrollbar-color: #444a4a transparent;
	}
}

@media (max-width: 479px) {
	.search-form--header input[type="search"] {
		max-width: 120px;
	}

	.nav-tabs > li > a .fa {
		display: none;
	}
}

@media (max-width: 359px) {
	.header-brand {
		font-size: 0;
	}

	.header-brand .logo {
		margin-right: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
	}
}

@media print {
	.header,
	.sidebar,
	.sidebar-overlay,
	.td-aside,
	.footer,
	.td-tabs,
	.td-pagination {
		display: none !important;
	}

	.app {
		padding: 0;
	}

	.app .content {
		padding: 0;
	}

	.td-main {
		flex-basis: 100%;
		max-width: 100%;
	}
}

/* ---------- Icon font and layout stability ----------
   Before FontAwesome loads, icons are drawn with a fallback font of another width, so lines
   re-wrap when it arrives (layout shift, CLS). A fixed box (the width of .fa-fw) keeps the layout
   identical before and after; rules that set an icon width explicitly still win. */
.fa {
	width: 1.28571429em;
	text-align: center;
}

/* "Обсудить на форуме" line appended to posts that have a forum topic (mu-plugin trydota-discuss). */
.td-discuss {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	margin: 24px 0 0;
	padding: 12px 16px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--td-muted);
	background: var(--td-bg-inset);
	border: 1px solid var(--td-border);
	border-left: 3px solid var(--td-accent);
	border-radius: 0 8px 8px 0;
}

.td-discuss .fa {
	font-size: 18px;
	color: var(--td-accent);
}

.td-discuss a {
	font-weight: 600;
}
