/* =========================================================
   Библиотека отчётов ФСТР: шапка, фильтры, список отчётов.
   Цвета взяты с эмблемы ФСТР (src/images/fstr-logo.svg).
   ========================================================= */
:root {
	--fstr-blue: #0770b9;
	--fstr-blue-dark: #1c4979;
	--fstr-blue-soft: #e6f1f9;
	--fstr-red: #ec1d27;
	--fstr-red-dark: #a3121a;
	--fstr-red-soft: #fdeced;
	--fstr-text: #2b2c2e;
	--fstr-muted: #5d5f62;
	--fstr-border: #dfe4ea;
	--fstr-border-strong: #c9d1db;
	--fstr-bg: #f4f6f8;
	--fstr-surface: #ffffff;
	--fstr-radius: 10px;
	--fstr-header-h: 67px;
	--fstr-gutter: 32px;
}

body { background: var(--fstr-bg); color: var(--fstr-text); }
a { color: var(--fstr-blue); }
a:hover { color: var(--fstr-blue-dark); }

/* ---------- Раскладка страницы ---------- */
.page > .wrp { max-width: 1440px; margin: 0 auto; padding: 24px var(--fstr-gutter) 0; box-sizing: border-box; }
.midside { padding-left: 0; }
.page--main .midside { padding-right: 0; }
.page--main .rightside { display: none; }

/* ---------- Шапка ---------- */
.fstr-header {
	position: sticky; top: 0; z-index: 60;
	background: var(--fstr-surface);
	border-bottom: 1px solid var(--fstr-border);
	box-shadow: 0 2px 8px rgba(20, 30, 50, .06);
}
.fstr-header::after {
	content: ""; display: block; height: 3px;
	background: linear-gradient(90deg, var(--fstr-blue) 0 50%, var(--fstr-red) 50% 100%);
}
.fstr-header__in {
	max-width: 1440px; margin: 0 auto; height: 64px;
	padding: 0 var(--fstr-gutter); box-sizing: border-box;
	display: flex; align-items: center; gap: 24px;
}
.fstr-logo { display: flex; align-items: center; gap: 10px; color: var(--fstr-text); text-decoration: none; flex-shrink: 0; }
.fstr-logo:hover { color: var(--fstr-text); text-decoration: none; }
.fstr-logo img { width: 48px; height: 48px; display: block; }
.fstr-logo__title { font-weight: 700; font-size: 17px; line-height: 1.15; white-space: nowrap; }

.fstr-nav { display: flex; gap: 4px; flex: 1; min-width: 0; }
.fstr-nav > a {
	padding: 8px 12px; border-radius: 8px;
	color: var(--fstr-text); font-weight: 500; white-space: nowrap; text-decoration: none;
}
.fstr-nav > a:hover { background: var(--fstr-bg); color: var(--fstr-text); text-decoration: none; }
.fstr-nav > a.active { background: var(--fstr-blue-soft); color: var(--fstr-blue); font-weight: 600; }

.fstr-search {
	position: relative; display: flex; align-items: center;
	width: 260px; height: 40px; flex-shrink: 1; min-width: 160px;
	border: 1px solid var(--fstr-border-strong); border-radius: 8px; background: var(--fstr-surface);
	box-sizing: border-box;
}
.fstr-search:focus-within { border-color: var(--fstr-blue); box-shadow: 0 0 0 3px var(--fstr-blue-soft); }
.fstr-search__icon { width: 16px; height: 16px; margin: 0 8px 0 12px; fill: none; stroke: var(--fstr-muted); stroke-width: 2; flex-shrink: 0; }
.fstr-search input[type="search"] {
	border: 0; outline: 0; background: transparent; box-shadow: none;
	flex: 1; min-width: 0; height: 100%; padding: 0 10px 0 0; font: inherit; color: var(--fstr-text);
}

.fstr-icon-btn {
	width: 44px; height: 44px; flex-shrink: 0;
	display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--fstr-border); border-radius: 8px; background: var(--fstr-surface);
	color: var(--fstr-text); cursor: pointer; padding: 0;
}
.fstr-icon-btn:hover { background: var(--fstr-bg); }
.fstr-icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.fstr-search-btn, .fstr-burger { display: none; }

/* Кнопка «Войти» / профиль из login.tpl на светлой шапке */
.fstr-login { flex-shrink: 0; }
.fstr-login #login_pane { float: none; margin: 0; visibility: visible; opacity: 1; text-align: left; }
.fstr-login #login_pane > li > .btn-border {
	color: var(--fstr-text); border: 1px solid var(--fstr-border); background: var(--fstr-surface);
	border-radius: 8px; height: 40px; line-height: 38px; padding: 0 16px; box-shadow: none;
}
.fstr-login #login_pane > li > .btn-border:hover { border-color: var(--fstr-border-strong); background: var(--fstr-bg); box-shadow: none; }
.fstr-login .pm_num { background: var(--fstr-red); color: #fff; }
.fstr-login #login_pane .dropdown-form { left: auto; right: 0; margin-left: 0; }

/* ---------- Общие элементы управления ---------- */
.fstr-btn {
	display: inline-flex; align-items: center; justify-content: center;
	height: 40px; padding: 0 16px; box-sizing: border-box;
	border: 1px solid var(--fstr-border-strong); border-radius: 8px;
	background: var(--fstr-surface); color: var(--fstr-text);
	font: inherit; font-weight: 500; line-height: 1; cursor: pointer; text-decoration: none; text-shadow: none; box-shadow: none;
}
.fstr-btn:hover { background: var(--fstr-bg); color: var(--fstr-text); text-decoration: none; }
.fstr-btn--primary { background: var(--fstr-blue); border-color: var(--fstr-blue); color: #fff; font-weight: 600; padding: 0 24px; }
.fstr-btn--primary:hover { background: var(--fstr-blue-dark); border-color: var(--fstr-blue-dark); color: #fff; }
.fstr-btn--sm { height: 36px; padding: 0 12px; }
.fstr-link { border: 0; background: none; padding: 8px 0; color: var(--fstr-blue); font: inherit; font-weight: 500; cursor: pointer; text-align: left; }
.fstr-link:hover { color: var(--fstr-blue-dark); text-decoration: underline; }
.fstr-spacer { flex: 1; }
.fstr-chip {
	display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px;
	background: var(--fstr-blue-soft); color: var(--fstr-blue-dark); font-size: 13px; white-space: nowrap;
}
.fstr-only-mobile { display: none; }

/* ---------- Панель фильтров ---------- */
.fstr-filter {
	position: sticky; top: var(--fstr-header-h); z-index: 40;
	background: var(--fstr-surface);
	border: 1px solid var(--fstr-border); border-radius: 12px;
	box-shadow: 0 2px 8px rgba(20, 30, 50, .06);
	padding: 18px 24px 20px; margin-bottom: 16px;
	max-height: calc(100vh - var(--fstr-header-h) - 16px); overflow-y: auto; box-sizing: border-box;
}
.fstr-filter__head { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.fstr-filter__title { margin: 0; font-size: 20px; font-weight: 700; white-space: nowrap; }
.fstr-filter__summary { display: none; flex: 1; min-width: 0; gap: 6px; flex-wrap: wrap; color: var(--fstr-muted); }
.fstr-filter__toggle { margin-left: auto; white-space: nowrap; }
.fstr-filter__close { display: none; margin-left: auto; }
.fstr-filter__form { display: flex; flex-direction: column; gap: 16px; margin-top: 14px; }

.fstr-filter.is-compact { padding-top: 10px; padding-bottom: 10px; }
.fstr-filter.is-compact .fstr-filter__form { display: none; }
.fstr-filter.is-compact .fstr-filter__summary { display: flex; }
.fstr-filter.is-compact .fstr-filter__title { font-size: 15px; }
.fstr-filter.is-compact .fstr-filter__toggle { margin-left: 0; }

.fstr-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.fstr-more { display: none; padding-top: 16px; border-top: 1px dashed var(--fstr-border); }
.fstr-filter.is-more .fstr-more { display: grid; }

.fstr-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
.fstr-label { font-size: 12px; font-weight: 600; color: var(--fstr-muted); }
.fstr-input, .fstr-filter select.fstr-input, .fstr-filter input.fstr-input {
	width: 100%; height: 40px; box-sizing: border-box;
	border: 1px solid var(--fstr-border-strong); border-radius: 8px; background: var(--fstr-surface);
	padding: 0 12px; font: inherit; color: var(--fstr-text); box-shadow: none;
}
.fstr-filter select.fstr-input--multi { height: auto; padding: 4px; }
.fstr-input:focus { border-color: var(--fstr-blue); outline: 0; box-shadow: 0 0 0 3px var(--fstr-blue-soft); }
.fstr-range { display: flex; align-items: center; gap: 6px; color: var(--fstr-muted); }
.fstr-range .fstr-input { padding: 0 10px; }

/* Селекты, которые заменены кнопками: остаются в форме для плагина фильтра */
.fstr-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; overflow: hidden; clip: rect(0 0 0 0); }

.fstr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fstr-chips button {
	height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer;
	border: 1px solid var(--fstr-border-strong); background: var(--fstr-surface); color: var(--fstr-text); font: inherit;
}
.fstr-seg { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.fstr-field--full { grid-column: 1 / -1; }
.fstr-chips--sm button { height: 32px; padding: 0 12px; font-size: 13px; }
.fstr-seg button {
	height: 40px; min-width: 0; border-radius: 8px; cursor: pointer;
	border: 1px solid var(--fstr-border-strong); background: var(--fstr-surface); color: var(--fstr-text); font: inherit; font-weight: 600;
}
.fstr-chips button:hover, .fstr-seg button:hover { border-color: var(--fstr-blue); }
.fstr-chips button[aria-pressed="true"], .fstr-seg button[aria-pressed="true"] { background: var(--fstr-blue); border-color: var(--fstr-blue); color: #fff; font-weight: 600; }

.fstr-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Список отчётов ---------- */
.fstr-results, #content > .fstr-row--head { background: var(--fstr-surface); }
.fstr-results { border: 1px solid var(--fstr-border); border-radius: 12px; overflow: clip; }
.fstr-results:not(:has(.fstr-row:not(.fstr-row--head))) { display: none; }
.fstr-row {
	display: grid;
	grid-template-columns: 120px 56px 108px minmax(0, 160px) minmax(0, 150px) minmax(0, 1fr) 84px 112px;
	align-items: start;
	border-bottom: 1px solid #eef1f4;
	background: var(--fstr-surface);
	font-size: 14px;
}
.fstr-row > div { padding: 14px 8px; min-width: 0; }
.fstr-row > div:first-child { padding-left: 16px; }
.fstr-row > div:last-child { padding: 10px 16px 10px 8px; text-align: right; }
.fstr-row:not(.fstr-row--head):hover { background: #f8fafc; }
.fstr-row--head {
	position: sticky; top: calc(var(--fstr-header-h) + var(--fstr-filter-h, 0px)); z-index: 30;
	background: #f8fafc; color: var(--fstr-muted);
	font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
	border-bottom: 1px solid var(--fstr-border);
}
.fstr-row--head > div { padding-top: 10px; padding-bottom: 10px; }
.fstr-c-type a { font-weight: 600; }
.fstr-ks {
	display: inline-block; min-width: 24px; padding: 2px 6px; border-radius: 6px; text-align: center;
	background: var(--fstr-red-soft); color: var(--fstr-red-dark); font-weight: 700;
}
.fstr-c-when { white-space: nowrap; }
.fstr-route {
	color: var(--fstr-text); line-height: 1.45;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fstr-route:hover { color: var(--fstr-blue); }
.fstr-c-route .editdate { margin: 4px 0 0; font-size: 12px; }
.fstr-c-act { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.fstr-edit { cursor: pointer; color: var(--fstr-muted); padding: 6px; }
#content > .fstr-row--head { border: 1px solid var(--fstr-border); border-radius: 12px 12px 0 0; }
#dle-content > .fstr-row:last-of-type { border-radius: 0 0 12px 12px; }
#content .navigation, #show_filter .navigation { margin: 16px 0; }

/* ---------- Оценки (рейтинг DLE «нравится / не нравится») ---------- */
.fstr-i { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fstr-rc { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.fstr-rc--up .fstr-i { color: var(--fstr-blue); }
.fstr-rc--down .fstr-i { color: var(--fstr-red); }
.fstr-c-rate { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; font-size: 13px; font-weight: 600; }
.fstr-c-rate .fstr-i { width: 15px; height: 15px; }
.fstr-row--head .fstr-c-rate { display: block; }
.fstr-c-rate.is-empty { color: #9aa1a9; font-weight: 400; }
.fstr-c-rate.is-empty .fstr-i { color: #b8bec6; }

/* ---------- Планшет ---------- */
@media (max-width: 1180px) {
	:root { --fstr-gutter: 20px; }
	.fstr-header__in { gap: 12px; }
	.fstr-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		flex-direction: column; gap: 0; padding: 8px var(--fstr-gutter) 16px;
		background: var(--fstr-surface); border-bottom: 1px solid var(--fstr-border);
		box-shadow: 0 8px 16px rgba(20, 30, 50, .10);
	}
	.fstr-nav > a { padding: 12px; }
	.fstr-nav-open .fstr-nav { display: flex; }
	.fstr-burger { display: inline-flex; }
	.fstr-logo__title { flex: 1; }
	.fstr-logo { flex: 1; min-width: 0; }
	.fstr-search { width: 220px; }
	.fstr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.fstr-field--route { grid-column: 1 / -1; }
	.fstr-row--head { display: none !important; }
	.fstr-row {
		grid-template-columns: auto auto auto minmax(0, 1fr) auto auto;
		grid-template-areas:
			"type ks when region region act"
			"route route route route route act"
			"lead lead lead lead rate act";
		column-gap: 10px; padding: 12px 16px;
	}
	.fstr-row > div, .fstr-row > div:first-child, .fstr-row > div:last-child { padding: 0; }
	.fstr-c-type { grid-area: type; }
	.fstr-c-ks { grid-area: ks; }
	.fstr-c-when { grid-area: when; color: var(--fstr-muted); }
	.fstr-c-region { grid-area: region; color: var(--fstr-muted); }
	.fstr-c-lead { grid-area: lead; color: var(--fstr-muted); font-size: 13px; }
	.fstr-c-route { grid-area: route; margin: 4px 0; }
	.fstr-c-act { grid-area: act; align-self: center; }
	.fstr-c-rate { grid-area: rate; flex-direction: row; gap: 10px; align-self: end; }
	.fstr-only-mobile { display: inline; }
	.fstr-results { border-radius: 12px; }
	#dle-content > .fstr-row:first-of-type { border-radius: 12px 12px 0 0; }
}

@media (max-width: 980px) {
	.midside, .page--main .midside { padding-left: 0; padding-right: 0; }
}

/* ---------- Телефон ---------- */
@media (max-width: 700px) {
	:root { --fstr-gutter: 16px; }
	.page > .wrp { padding-top: 12px; }
	.fstr-header__in { height: 56px; gap: 6px; }
	.fstr-logo img { width: 40px; height: 40px; }
	.fstr-logo__title { font-size: 15px; white-space: normal; }
	.fstr-search {
		display: none; position: absolute; left: var(--fstr-gutter); right: var(--fstr-gutter); top: 8px;
		width: auto; height: 44px; z-index: 2;
	}
	.fstr-search-open .fstr-search { display: flex; }
	.fstr-search-btn { display: inline-flex; border: 0; }
	.fstr-burger { border: 0; }
	.fstr-login #login_pane > li > .btn-border { padding: 0 10px; height: 36px; line-height: 34px; }
	.fstr-login #login_pane .dropdown-form { top: 70px; }

	.fstr-filter {
		top: var(--fstr-header-h); margin: 0 calc(var(--fstr-gutter) * -1) 12px;
		border-radius: 0; border-left: 0; border-right: 0; padding: 8px var(--fstr-gutter);
	}
	.fstr-filter__title { display: none; }
	.fstr-filter.is-compact .fstr-filter__summary { flex-wrap: nowrap; overflow: hidden; order: 2; }
	.fstr-filter.is-compact .fstr-filter__toggle {
		order: 1; height: 44px; padding: 0 14px; border-radius: 8px;
		background: var(--fstr-blue); color: #fff; font-weight: 600; text-decoration: none;
	}
	.fstr-filter.is-sheet {
		position: fixed; inset: 0; z-index: 100; margin: 0; max-height: none; border: 0;
		padding: 0 var(--fstr-gutter) 16px; overflow-y: auto;
	}
	.fstr-filter.is-sheet .fstr-filter__head {
		position: sticky; top: 0; z-index: 1; background: var(--fstr-surface);
		margin: 0 calc(var(--fstr-gutter) * -1); padding: 6px var(--fstr-gutter); border-bottom: 1px solid var(--fstr-border);
	}
	.fstr-filter.is-sheet .fstr-filter__title { display: block; font-size: 18px; }
	.fstr-filter.is-sheet .fstr-filter__toggle { display: none; }
	.fstr-filter.is-sheet .fstr-filter__close { display: inline-flex; border: 0; }
	.fstr-filter.is-sheet .fstr-actions {
		position: sticky; bottom: -16px; background: var(--fstr-surface);
		margin: 0 calc(var(--fstr-gutter) * -1); padding: 12px var(--fstr-gutter) 16px;
		border-top: 1px solid var(--fstr-border);
	}
	.fstr-filter.is-sheet .fstr-actions .fstr-btn--primary { flex: 1; height: 48px; font-size: 16px; }
	.fstr-sheet-open body { overflow: hidden; }
	.fstr-grid { grid-template-columns: minmax(0, 1fr); }
	.fstr-input, .fstr-filter select.fstr-input, .fstr-filter input.fstr-input, .fstr-seg button { height: 44px; }
	.fstr-actions .fstr-link { width: 100%; }
	.fstr-actions .fstr-spacer { display: none; }

	.fstr-results { border: 0; background: transparent; overflow: visible; }
	.fstr-row {
		grid-template-columns: auto auto minmax(0, 1fr) auto;
		grid-template-areas:
			"type ks . when"
			"route route route route"
			"region region region region"
			"lead lead lead rate";
		border: 1px solid var(--fstr-border); border-radius: 12px; margin-bottom: 10px; padding: 14px;
	}
	.fstr-c-act { display: none; }
	.fstr-route { -webkit-line-clamp: 3; }
	.fstr-c-region { font-size: 13px; }
	#dle-content > .fstr-row:first-of-type, #dle-content > .fstr-row:last-of-type { border-radius: 12px; }
}

/* =========================================================
   Полная карточка отчёта (fullstory.tpl)
   ========================================================= */
.page.showfull .midside { padding-right: 0; }
.page.showfull #content > .rightside { display: none; }

.fstr-panel { background: var(--fstr-surface); border: 1px solid var(--fstr-border); border-radius: var(--fstr-radius); }
.fstr-card { display: block; }
.fstr-card__layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.fstr-card__main { display: grid; gap: 20px; min-width: 0; }
.fstr-card__main > .fstr-card__head { border-bottom-left-radius: 0; border-bottom-right-radius: 0; margin-bottom: -21px; }
.fstr-card__main > .fstr-facts { border-top-left-radius: 0; border-top-right-radius: 0; }

.fstr-card__head { padding: 22px 24px 20px; }
.fstr-card__top { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.fstr-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.fstr-tag {
	display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px; border-radius: 999px;
	font-size: 13px; font-weight: 600; line-height: 1.3;
	background: var(--fstr-bg); color: var(--fstr-text);
}
.fstr-tag--type { background: var(--fstr-blue-soft); }
.fstr-tag--type a { color: var(--fstr-blue); text-decoration: none; }
.fstr-tag--ks { background: var(--fstr-blue); color: #fff; }
.fstr-tag--medal { background: #fbf3dc; color: #8a6508; }
.fstr-card__tools { display: flex; gap: 6px; flex-shrink: 0; }
.fstr-tool {
	display: inline-flex; align-items: center; height: 32px; padding: 0 10px; cursor: pointer;
	border: 1px solid var(--fstr-border); border-radius: 8px; font-size: 13px; color: var(--fstr-text); white-space: nowrap;
}
.fstr-card__tools a { color: inherit; text-decoration: none; }
.fstr-tool:hover { border-color: var(--fstr-blue); color: var(--fstr-blue); }
.fstr-tool.is-on { color: var(--fstr-blue); }
.fstr-card__title { font-size: 26px; line-height: 1.25; font-weight: 700; margin: 0 0 6px; text-wrap: balance; }
.fstr-card__route { margin: 0; color: var(--fstr-muted); }
.fstr-card__route b { color: var(--fstr-text); font-weight: 600; }
.fstr-arr { color: var(--fstr-blue); }

.fstr-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 0; }
.fstr-fact { padding: 14px 24px; border-right: 1px solid var(--fstr-border); min-width: 0; }
.fstr-fact:last-child { border-right: 0; }
.fstr-fact dt { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--fstr-muted); margin-bottom: 3px; }
.fstr-fact dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.fstr-fact dd small { display: block; font-weight: 400; color: var(--fstr-muted); font-size: 13px; }

.fstr-section { padding: 20px 24px; }
.fstr-section h2, .fstr-comments h2, .fstr-files h2 { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
.fstr-video { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 8px; overflow: hidden; background: #000; }
.fstr-video iframe, .fstr-video video { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }
.fstr-story__text { max-width: 75ch; line-height: 1.6; }
.fstr-story:has(.fstr-story__text:empty) { display: none; }
.fstr-editdate { margin: 12px 0 0; font-size: 13px; color: var(--fstr-muted); }

.fstr-card__side { display: grid; gap: 16px; position: sticky; top: calc(var(--fstr-header-h) + 16px); }
.fstr-files { padding: 18px; display: grid; gap: 10px; }
.fstr-files h2 { font-size: 15px; margin: 0 0 2px; }
.fstr-file {
	position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px;
	border: 1px solid var(--fstr-border-strong); border-radius: 8px; background: var(--fstr-surface); color: var(--fstr-text);
}
.fstr-file:hover { border-color: var(--fstr-blue); }
.fstr-file__ico {
	width: 36px; height: 36px; flex-shrink: 0; border-radius: 6px; display: grid; place-items: center;
	font-size: 11px; font-weight: 700; background: var(--fstr-blue-soft); color: var(--fstr-blue);
}
.fstr-file__body { min-width: 0; display: block; }
.fstr-file__t { display: block; font-weight: 600; line-height: 1.25; }
.fstr-file .attachment { display: block; font-size: 12px; line-height: 1.35; }
.fstr-file .attachment__link {
	color: inherit; opacity: .75; text-decoration: none;
	display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fstr-file .attachment__link::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
.fstr-file .attachment__meta { opacity: .75; }
.fstr-file--primary { background: var(--fstr-blue); border-color: var(--fstr-blue); color: #fff; }
.fstr-file--primary:hover { background: var(--fstr-blue-dark); border-color: var(--fstr-blue-dark); }
.fstr-file--primary .fstr-file__ico { background: rgba(255, 255, 255, .18); color: #fff; }

.fstr-meta { padding: 16px 18px; font-size: 13px; color: var(--fstr-muted); display: grid; gap: 8px; }
.fstr-meta > div { display: flex; justify-content: space-between; gap: 12px; }
.fstr-meta b { color: var(--fstr-text); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.fstr-meta b a { color: inherit; }
.fstr-meta__link { padding-top: 8px; border-top: 1px solid var(--fstr-border); }

/* Оценка в карточке */
.fstr-score { display: inline-flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border: 1px solid var(--fstr-border); border-radius: 8px; font-size: 13px; font-weight: 600; }
.fstr-rate { padding: 18px; display: grid; gap: 12px; }
.fstr-rate h2 { font-size: 15px; font-weight: 700; margin: 0; }
.fstr-rate__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fstr-rate__btns > a { display: block; text-decoration: none; }
.fstr-vote {
	display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; box-sizing: border-box;
	border: 1px solid var(--fstr-border-strong); border-radius: 8px; background: var(--fstr-surface);
	font-size: 16px; font-weight: 600; color: var(--fstr-text); font-variant-numeric: tabular-nums;
	transition: background .15s, border-color .15s, color .15s;
}
.fstr-vote .fstr-i { width: 20px; height: 20px; }
.fstr-vote--up .fstr-i { color: var(--fstr-blue); }
.fstr-vote--down .fstr-i { color: var(--fstr-red); }
.fstr-rate__btns > a:hover .fstr-vote--up { border-color: var(--fstr-blue); background: var(--fstr-blue-soft); }
.fstr-rate__btns > a:hover .fstr-vote--down { border-color: var(--fstr-red); background: var(--fstr-red-soft); }
.fstr-rate__btns > a:focus-visible { outline: 2px solid var(--fstr-blue); outline-offset: 2px; border-radius: 8px; }
.fstr-vote.is-on, .fstr-rate__btns > a:hover .fstr-vote.is-on { color: #fff; }
.fstr-vote--up.is-on, .fstr-rate__btns > a:hover .fstr-vote--up.is-on { background: var(--fstr-blue); border-color: var(--fstr-blue); }
.fstr-vote--down.is-on, .fstr-rate__btns > a:hover .fstr-vote--down.is-on { background: var(--fstr-red); border-color: var(--fstr-red); }
.fstr-vote.is-on .fstr-i { color: #fff; }
.fstr-rate.is-voted .fstr-vote:not(.is-on) { opacity: .55; }
.fstr-rate__bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--fstr-border); }
.fstr-rate__bar i { display: block; height: 100%; background: var(--fstr-blue); transition: width .3s; }
.fstr-rate__bar i + i { background: var(--fstr-red); }
.fstr-rate.is-empty .fstr-rate__bar { display: none; }
.fstr-rate__sum { margin: 0; font-size: 13px; color: var(--fstr-muted); display: flex; justify-content: space-between; gap: 8px; }
.fstr-rate__sum b { color: var(--fstr-text); }
.fstr-rate__thanks { margin: 0; font-size: 13px; color: var(--fstr-blue-dark); }
@media (prefers-reduced-motion: reduce) { .fstr-vote, .fstr-rate__bar i { transition: none; } }

.fstr-comments { margin-top: 20px; padding: 20px 24px; float: none !important; width: auto !important; }
.fstr-comments h2 span { color: var(--fstr-muted); font-weight: 400; }
.fstr-pager { margin: 20px 0 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fstr-pager a { display: block; padding: 14px 18px; color: var(--fstr-text); text-decoration: none; }
.fstr-pager a:hover { border-color: var(--fstr-blue); color: var(--fstr-blue); }
.fstr-pager small { display: block; color: var(--fstr-muted); font-size: 12px; }
.fstr-pager__next { grid-column: 2; text-align: right; }

.fstr-mobile-bar { display: none; }

@media (max-width: 980px) {
	.fstr-card__layout { grid-template-columns: minmax(0, 1fr); }
	.fstr-card__side { position: static; }
	.fstr-fact { border-bottom: 1px solid var(--fstr-border); }
}
@media (max-width: 700px) {
	.fstr-card__head { padding: 16px; }
	.fstr-card__title { font-size: 21px; }
	.fstr-card__top { flex-wrap: wrap; }
	.fstr-tool__t { display: none; }
	.fstr-fact { padding: 12px 16px; }
	.fstr-section, .fstr-comments { padding: 16px; }
	.fstr-pager { grid-template-columns: 1fr; margin-bottom: 88px; }
	.fstr-pager__next { grid-column: auto; text-align: left; }
	.fstr-mobile-bar {
		display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
		padding: 10px var(--fstr-gutter) calc(10px + env(safe-area-inset-bottom, 0px));
		background: var(--fstr-surface); border-top: 1px solid var(--fstr-border);
		box-shadow: 0 -4px 12px rgba(20, 30, 50, .08);
	}
}

/* Хлебные крошки на странице отчёта: в styles.css они позиционированы абсолютно */
.page.showfull .pagetools { position: static; margin: 0 0 16px; }
.page.showfull .fstr-card { clear: both; }

/* Низ страницы отчёта: в styles.css у .showfull .comments и .showfull #content .box стоит float: left,
   из-за этого форма комментария выпадала из секции, а навигация сжималась в узкую колонку */
.page.showfull .fstr-comments { display: flow-root; clear: both; }
.page.showfull #content .fstr-comments .box,
.page.showfull .fstr-comments .comments,
.page.showfull .fstr-comments form { float: none; width: auto; margin-left: 0; margin-right: 0; }
.page.showfull .fstr-comments .box { margin-bottom: 0; box-shadow: none; border: 1px solid var(--fstr-border); border-radius: var(--fstr-radius); }
.page.showfull .fstr-comments .box + .box,
.page.showfull .fstr-comments #dle-comments-list + * { margin-top: 16px; }
.page.showfull .fstr-pager { clear: both; float: none; width: auto; display: grid; }

/* ---------- Подвал ---------- */
.fstr-footer { clear: both; margin-top: 40px; background: var(--fstr-surface); color: var(--fstr-text); font-size: 14px; line-height: 1.5; border-top: 1px solid var(--fstr-border); position: relative; }
.fstr-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 4px; background: linear-gradient(90deg, var(--fstr-blue) 0 50%, var(--fstr-red) 50% 100%); }
.fstr-footer__main { max-width: 1440px; margin: 0 auto; padding: 36px var(--fstr-gutter) 32px; box-sizing: border-box; display: grid; grid-template-columns: 1.3fr .9fr 1fr; gap: 32px; }
.fstr-footer__brand { display: grid; gap: 12px; align-content: start; }
.fstr-footer__logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--fstr-text); text-decoration: none; }
.fstr-footer__logo:hover { color: var(--fstr-text); text-decoration: none; }
.fstr-footer__brand p { margin: 0; color: var(--fstr-muted); max-width: 42ch; }
.fstr-footer__ext { color: var(--fstr-blue); font-weight: 500; text-decoration: none; justify-self: start; }
.fstr-footer__ext:hover { text-decoration: underline; }
.fstr-footer__title { margin: 0 0 12px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--fstr-muted); }
.fstr-footer__nav { display: grid; gap: 8px; }
.fstr-footer__nav a { color: var(--fstr-text); text-decoration: none; }
.fstr-footer__nav a:hover { color: var(--fstr-blue); }
.fstr-footer__vk { min-width: 0; }
.fstr-footer__vk #vk_groups { max-width: 340px; }
.fstr-footer__bar { background: var(--fstr-blue-dark); color: #d7e3f0; font-size: 13px; }
.fstr-footer__bar-in { max-width: 1440px; margin: 0 auto; padding: 14px var(--fstr-gutter); box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; }
.fstr-footer .copyright { width: auto; padding: 0; border: 0; color: #d7e3f0; }
.fstr-footer .copyright a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.35); }
.fstr-footer .copyright a:hover { border-bottom-color: #fff; }
.fstr-footer__counters { display: flex; align-items: center; gap: 8px; }
.fstr-footer__counters img { display: block; width: 88px; height: 31px; border: 0; opacity: .75; transition: opacity .15s; }
.fstr-footer__counters a:hover img { opacity: 1; }
.fstr-footer__up { width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; display: grid; place-items: center; }
.fstr-footer__up:hover { border-color: #fff; }
.fstr-footer__up svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2.5; }
@media (max-width: 980px) {
	.fstr-footer__main { grid-template-columns: 1fr 1fr; }
	.fstr-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
	.fstr-footer__main { grid-template-columns: 1fr; gap: 24px; padding: 28px 16px 24px; }
	.fstr-footer__nav { grid-template-columns: 1fr 1fr; }
	.fstr-footer__vk #vk_groups { max-width: none; }
	.fstr-footer__bar-in { flex-direction: column; align-items: flex-start; padding: 14px 16px; }
}

/* =========================================================
   Обычные страницы: статические, обратная связь, поиск по сайту
   ========================================================= */
.page--wide .midside { padding-right: 0; }
.page--wide .rightside { display: none; }

/* Хлебные крошки на всех страницах: без рамки, мелким серым */
.pagetools { border: 0; height: auto; padding: 0; margin: 0 0 12px; overflow: visible; font-size: 13px; background: none; }
.pagetools_back { display: none; }
.pagetools .speedbar, .pagetools .sortbar_in { height: auto; padding: 0; line-height: 1.5; }
.pagetools_in { color: var(--fstr-muted); }
.pagetools a { color: var(--fstr-muted); }
.pagetools a:hover { color: var(--fstr-blue); }
#combo-tools .pagetools_in { height: auto; display: flex; flex-wrap: wrap-reverse; justify-content: space-between; gap: 8px 24px; }
#combo-tools.active > .pagetools_in { margin-top: 0; }

.fstr-page { margin-bottom: 16px; }
.fstr-page__head {
	display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
	padding: 22px 24px 18px; border-bottom: 1px solid var(--fstr-border);
}
.fstr-page__title { margin: 0; font-size: 26px; line-height: 1.25; font-weight: 700; text-wrap: balance; }
.fstr-page__lead { margin: 6px 0 0; color: var(--fstr-muted); }
.fstr-page__body { padding: 20px 24px 24px; }
.fstr-prose { line-height: 1.6; }
.fstr-prose > :first-child { margin-top: 0; }
.fstr-prose p { margin: 0 0 12px; }
.fstr-prose h2, .fstr-prose h3 { font-size: 17px; margin: 20px 0 10px; }

/* Подборки отчётов: таблица из редактора DLE со встроенными размерами */
.fstr-static .fstr-prose > p { font-size: 17px; font-weight: 700; text-align: left !important; margin: 28px 0 12px; }
.fstr-static .fstr-prose > p:first-child { margin-top: 0; }
.fstr-static .fstr-prose table {
	width: 100% !important; height: auto !important; margin: 0 !important;
	border: 1px solid var(--fstr-border) !important; border-collapse: separate; border-spacing: 0;
	border-radius: var(--fstr-radius); overflow: hidden; table-layout: fixed;
}
.fstr-static .fstr-prose col { width: auto !important; }
.fstr-static .fstr-prose tr { height: auto !important; }
.fstr-static .fstr-prose td, .fstr-static .fstr-prose th {
	height: auto !important; padding: 10px 8px; vertical-align: top; text-align: center; color: var(--fstr-muted);
	border: 0 !important; border-bottom: 1px solid #eef1f4 !important; border-left: 1px solid #eef1f4 !important;
}
.fstr-static .fstr-prose tr > :first-child { border-left: 0 !important; }
.fstr-static .fstr-prose tr:last-child > * { border-bottom: 0 !important; }
.fstr-static .fstr-prose tr:first-child > * {
	background: #f8fafc; color: var(--fstr-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; vertical-align: middle;
}
.fstr-static .fstr-prose tr:first-child b { font-weight: 700; }
.fstr-static .fstr-prose tr > td:first-child { text-align: left !important; vertical-align: middle; padding-left: 16px; background: #fbfcfd; color: var(--fstr-text); }
.fstr-static .fstr-prose td p { display: inline-block; margin: 2px; }
.fstr-static .fstr-prose td a {
	display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 30px; padding: 0 10px;
	border-radius: 999px; background: var(--fstr-blue-soft); color: var(--fstr-blue-dark); font-weight: 600; font-size: 13px; text-decoration: none;
}
.fstr-static .fstr-prose td a:hover { background: var(--fstr-blue); color: #fff; }

/* Формы: обратная связь и поиск */
.fstr-form { display: grid; gap: 16px; max-width: 720px; }
.fstr-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fstr-textarea, .fstr-filter textarea.fstr-input, textarea.fstr-input { height: auto; min-height: 160px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.fstr-recipient select, .fstr-page select, .fstr-page input[type="text"], .fstr-page input[type="email"], .fstr-page input[type="search"] {
	width: 100%; height: 40px; box-sizing: border-box;
	border: 1px solid var(--fstr-border-strong); border-radius: 8px; background: var(--fstr-surface);
	padding: 0 12px; font: inherit; color: var(--fstr-text); box-shadow: none;
}
.fstr-page select[multiple] { height: auto; min-height: 120px; padding: 4px; }
.fstr-page input:focus, .fstr-page select:focus, .fstr-page textarea:focus { border-color: var(--fstr-blue); outline: 0; box-shadow: 0 0 0 3px var(--fstr-blue-soft); }
.fstr-file-input { font: inherit; }
.fstr-form__submit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--fstr-border); }
.fstr-captcha { display: flex; align-items: center; gap: 10px; }
.fstr-captcha img { border-radius: 6px; border: 1px solid var(--fstr-border); }
.fstr-captcha .fstr-input { width: 160px; }
.fstr-btn--lg { height: 44px; padding: 0 24px; }

.fstr-searchbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fstr-searchbar input[type="text"], .fstr-searchbar input[type="search"], .fstr-searchbar #searchinput { flex: 1 1 320px; width: auto; height: 44px; font-size: 16px; }
.fstr-searchbar .fstr-btn { height: 44px; }
.fstr-hint { margin: 12px 0 0; color: var(--fstr-muted); font-size: 13px; }
.fstr-search-msg { padding: 14px 24px; border-top: 1px solid var(--fstr-border); color: var(--fstr-muted); background: #f8fafc; border-radius: 0 0 var(--fstr-radius) var(--fstr-radius); }
.fstr-search-msg b { color: var(--fstr-text); }

.fstr-ext { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fstr-ext__wide { grid-column: 1 / -1; }
.fstr-fieldset { margin: 0; padding: 14px 16px 16px; border: 1px solid var(--fstr-border); border-radius: var(--fstr-radius); min-width: 0; }
.fstr-fieldset legend { padding: 0 6px; margin-left: -6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--fstr-muted); }
.fstr-opts { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 10px; }
.fstr-opts select { width: auto; flex: 1 1 180px; }
.fstr-opts label { display: inline-flex; align-items: center; gap: 6px; }
.fstr-check { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; }
.fstr-ext__actions { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--fstr-border); }

/* Результаты поиска: та же таблица, что в каталоге; заголовок только когда есть строки */
.fstr-search-head { display: none; border: 1px solid var(--fstr-border); border-radius: 12px 12px 0 0; }
.fstr-search-head:has(~ .fstr-row), .fstr-search-head:has(~ * .fstr-row) { display: grid; }

@media (max-width: 1180px) {
	.fstr-search-head:has(~ .fstr-row), .fstr-search-head:has(~ * .fstr-row) { display: none; }
}
@media (max-width: 700px) {
	.fstr-page__head { padding: 16px; }
	.fstr-page__title { font-size: 22px; }
	.fstr-page__body { padding: 16px; }
	.fstr-form__row, .fstr-ext { grid-template-columns: minmax(0, 1fr); }
	.fstr-form__submit .fstr-btn--primary { width: 100%; }
	.fstr-searchbar .fstr-btn { flex: 1; }
	.fstr-search-msg { padding: 12px 16px; }
	.fstr-static .fstr-prose table { display: block; overflow-x: auto; table-layout: auto; }
	.fstr-static .fstr-prose tbody { display: table; min-width: 680px; width: 100%; }
	.fstr-static .fstr-prose tr > td:first-child { position: sticky; left: 0; z-index: 1; width: 110px; padding-left: 12px; box-shadow: 1px 0 0 #eef1f4; }
}
