:root {
	color-scheme: light;
	--bg: #ffffff;
	--text: #0b0b0b;
	--muted: #555555;
	--line: #d9d9d9;
	--soft: #f4f4f4;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: Arial, Helvetica, sans-serif;
	line-height: 1.55;
}

a {
	color: inherit;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	border-bottom: 1px solid var(--line);
	background: #ffffff;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.header-inner,
.footer-inner,
.page {
	width: min(1180px, calc(100% - 32px));
	margin: 0 auto;
}

.header-inner {
	min-height: 76px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.brand {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	text-decoration: none;
}

.brand-logo {
	display: block;
	width: auto;
	height: 72px;
	max-width: min(280px, 48vw);
	object-fit: contain;
}

.main-nav {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 18px;
	font-size: 0.95rem;
	font-weight: 700;
}

.main-nav a {
	text-decoration: none;
}

.nav-form {
	margin: 0;
}

.nav-form button {
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	padding: 0;
}

.ad-banner {
	width: min(1180px, calc(100% - 32px));
	min-height: 92px;
	margin: 0 auto 18px;
	border: 1px dashed #999999;
	background: #fafafa;
	display: grid;
	place-items: center;
	color: #666666;
	font-size: 0.8rem;
	text-transform: uppercase;
}

.page {
	padding: 34px 0 54px;
}

.home-heading {
	margin-bottom: 24px;
}

.eyebrow {
	margin: 0 0 6px;
	color: var(--muted);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

h1,
h2,
p {
	margin-top: 0;
}

.home-heading h1 {
	margin-bottom: 0;
	font-size: clamp(2rem, 4vw, 3.4rem);
	line-height: 1.05;
	letter-spacing: 0;
}

.news-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 18px;
}

.news-card {
	min-width: 0;
	border: 1px solid var(--line);
	background: #ffffff;
}

.card-link {
	height: 100%;
	display: flex;
	flex-direction: column;
	text-decoration: none;
}

.card-image {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-bottom: 1px solid var(--line);
	background: var(--soft);
}

.card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	padding: 16px;
}

time {
	color: var(--muted);
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
}

.news-card h2 {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.2;
	letter-spacing: 0;
}

.news-card p {
	margin: 0;
	color: var(--muted);
	font-size: 0.94rem;
}

.news-card:hover {
	border-color: #111111;
}

.empty-state {
	padding: 26px;
	border: 1px solid var(--line);
	background: var(--soft);
}

.pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 30px;
}

.pagination-pages {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
}

.pagination-link,
.pagination-page {
	min-height: 44px;
	border: 1px solid var(--line);
	background: #ffffff;
	color: var(--text);
	display: inline-grid;
	place-items: center;
	font-weight: 800;
	text-decoration: none;
}

.pagination-link {
	padding: 0 16px;
}

.pagination-page {
	width: 44px;
}

.pagination-link:hover,
.pagination-page:hover {
	border-color: #111111;
}

.pagination-disabled {
	background: var(--soft);
	color: var(--muted);
}

.pagination-disabled:hover {
	border-color: var(--line);
}

.pagination-page.is-current {
	border-color: #111111;
	background: #111111;
	color: #ffffff;
}

.news-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 34px;
	align-items: start;
}

.article {
	min-width: 0;
}

.article-image {
	width: 100%;
	max-height: 420px;
	object-fit: cover;
	margin-bottom: 22px;
	border: 1px solid var(--line);
	background: var(--soft);
}

.article h1 {
	max-width: 840px;
	margin: 8px 0 16px;
	font-size: clamp(2rem, 4.5vw, 4rem);
	line-height: 1.02;
	letter-spacing: 0;
}

.article-admin-actions {
	display: flex;
	margin-bottom: 18px;
}

.article-summary {
	max-width: 760px;
	margin-bottom: 28px;
	color: #333333;
	font-size: 1.18rem;
	line-height: 1.45;
	font-weight: 700;
}

.article-content {
	max-width: 760px;
	font-size: 1.06rem;
}

.article-content p {
	margin-bottom: 20px;
}

.latest-news-sidebar {
	position: sticky;
	top: 18px;
	min-width: 0;
	display: grid;
	gap: 16px;
}

.latest-news-sidebar h2 {
	margin-bottom: 2px;
	font-size: 1.35rem;
	line-height: 1.2;
	letter-spacing: 0;
}

.latest-news-list {
	display: grid;
	gap: 12px;
}

.latest-news-item {
	min-width: 0;
	border: 1px solid var(--line);
	display: grid;
	grid-template-columns: 112px minmax(0, 1fr);
	gap: 14px;
	align-items: center;
	padding: 10px;
	text-decoration: none;
}

.latest-news-item:hover {
	border-color: #111111;
}

.latest-news-item img {
	width: 112px;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	background: var(--soft);
}

.latest-news-item span {
	min-width: 0;
	display: grid;
	gap: 5px;
}

.latest-news-item strong {
	font-size: 1rem;
	line-height: 1.25;
}


.site-footer {
	border-top: 1px solid var(--line);
	padding: 20px 0 30px;
}


.footer-inner {
	display: flex;
	justify-content: space-between;
	gap: 18px;
	color: var(--muted);
	font-size: 0.9rem;
}

.footer-inner strong {
	color: var(--text);
}

.admin-page {
	min-height: 56vh;
}

.admin-panel {
	max-width: 460px;
	border: 1px solid var(--line);
	padding: 24px;
	background: #ffffff;
}

.admin-panel-wide {
	max-width: 860px;
}

.admin-panel h1 {
	margin-bottom: 22px;
	font-size: 2rem;
	line-height: 1.1;
	letter-spacing: 0;
}

.admin-title-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 18px;
}

.admin-title-row h1 {
	margin-bottom: 0;
}

.admin-title-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.admin-form {
	display: grid;
	gap: 18px;
}

.admin-form label {
	display: grid;
	gap: 7px;
	color: #222222;
	font-size: 0.9rem;
	font-weight: 800;
}

.admin-form input,
.admin-form textarea {
	width: 100%;
	border: 1px solid #999999;
	border-radius: 0;
	background: #ffffff;
	color: var(--text);
	font: inherit;
	font-weight: 400;
	padding: 11px 12px;
}

.admin-form textarea {
	resize: vertical;
}

.admin-form input:focus,
.admin-form textarea:focus {
	outline: 2px solid #111111;
	outline-offset: 2px;
}

.admin-form button,
.secondary-action,
.danger-action {
	min-height: 44px;
	border: 1px solid #111111;
	background: #111111;
	color: #ffffff;
	cursor: pointer;
	display: inline-grid;
	place-items: center;
	font: inherit;
	font-weight: 800;
	padding: 10px 16px;
	text-decoration: none;
}

.secondary-action {
	background: #ffffff;
	color: #111111;
}

.danger-action {
	border-color: #9f1d12;
	background: #9f1d12;
	color: #ffffff;
}

.inline-action {
	margin: 0;
}

.form-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 220px;
	gap: 18px;
}

.image-fields {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 18px;
}

.current-image {
	display: grid;
	gap: 7px;
	color: #222222;
	font-size: 0.9rem;
	font-weight: 800;
}

.current-image img {
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 1px solid var(--line);
	object-fit: cover;
	background: var(--soft);
}

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

.form-error {
	border: 1px solid #111111;
	background: #f4f4f4;
	color: #111111;
	font-weight: 800;
	margin-bottom: 18px;
	padding: 12px 14px;
}


.admin-panel-full {
	max-width: 1180px;
}

.report-updated {
	margin: 8px 0 0;
	color: var(--muted);
	font-size: 0.92rem;
}

.report-metrics {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 22px;
}

.report-metric {
	min-width: 0;
	border: 1px solid var(--line);
	background: var(--soft);
	padding: 14px;
}

.report-metric span {
	display: block;
	color: var(--muted);
	font-size: 0.78rem;
	font-weight: 800;
	text-transform: uppercase;
}

.report-metric strong {
	display: block;
	margin-top: 4px;
	font-size: 1.8rem;
	line-height: 1.1;
}

.report-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 18px;
}

.report-block {
	min-width: 0;
	margin-top: 10px;
}

.report-block-wide {
	margin-top: 24px;
}

.report-block h2 {
	margin-bottom: 12px;
	font-size: 1.25rem;
	line-height: 1.2;
}

.report-block .pagination {
	justify-content: flex-start;
	margin-top: 14px;
}

.report-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--line);
}

.report-table {
	width: 100%;
	min-width: 620px;
	border-collapse: collapse;
	background: #ffffff;
}

.report-table th,
.report-table td {
	border-bottom: 1px solid var(--line);
	padding: 11px 12px;
	text-align: left;
	vertical-align: top;
}

.report-table th {
	background: var(--soft);
	font-size: 0.78rem;
	font-weight: 800;
	text-transform: uppercase;
}

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

.report-table strong {
	display: block;
	line-height: 1.25;
}

.report-table span {
	display: block;
	color: var(--muted);
	font-size: 0.82rem;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.visitor-id {
	font-family: Consolas, Monaco, monospace;
}

.render-metrics {
	margin-bottom: 16px;
}

.render-chart {
	display: grid;
	grid-template-columns: repeat(18, minmax(34px, 1fr));
	gap: 10px;
	align-items: end;
	min-height: 220px;
	border: 1px solid var(--line);
	background: #ffffff;
	padding: 16px;
	overflow-x: auto;
}

.render-chart-bar {
	min-width: 34px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
}

.render-chart-value,
.render-chart-label {
	width: 100%;
	color: var(--muted);
	font-size: 0.72rem;
	font-weight: 800;
	line-height: 1.1;
	text-align: center;
	white-space: nowrap;
}

.render-chart-value {
	color: var(--text);
}

.render-chart-track {
	width: 100%;
	height: 142px;
	display: flex;
	align-items: flex-end;
	border: 1px solid var(--line);
	background: var(--soft);
}

.render-chart-fill {
	width: 100%;
	height: var(--bar-height);
	min-height: 4px;
	background: #0f766e;
}

.render-chart-bar:nth-child(3n) .render-chart-fill {
	background: #111111;
}

.render-chart-bar:nth-child(3n + 2) .render-chart-fill {
	background: #b42318;
}

.log-table {
	min-width: 980px;
}

.log-sql {
	font-family: Consolas, Monaco, monospace;
}

.admin-news-list {
	display: grid;
	gap: 12px;
}

.admin-news-item {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr) auto;
	gap: 14px;
	align-items: center;
	border: 1px solid var(--line);
	padding: 10px;
}

.admin-news-item img {
	width: 120px;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	background: var(--soft);
}

.admin-news-item h2 {
	margin: 4px 0 6px;
	font-size: 1.05rem;
	line-height: 1.25;
}

.admin-news-item p {
	margin: 0;
	color: var(--muted);
	font-size: 0.9rem;
}

.admin-row-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

@media (min-width: 1100px) {
	.news-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (max-width: 860px) {
	.news-layout {
		grid-template-columns: 1fr;
	}

	.latest-news-sidebar {
		position: static;
	}
}

@media (max-width: 620px) {
	.header-inner,
	.footer-inner {
		align-items: flex-start;
		flex-direction: column;
	}

	.ad-banner {
		min-height: 74px;
	}

	.page {
		padding-top: 24px;
	}

	.latest-news-sidebar {
		gap: 12px;
	}

	.pagination {
		justify-content: flex-start;
	}

	.pagination-pages {
		order: 3;
		width: 100%;
		justify-content: flex-start;
	}

	.latest-news-item {
		grid-template-columns: 86px minmax(0, 1fr);
	}

	.latest-news-item img {
		width: 86px;
	}

	.form-grid {
		grid-template-columns: 1fr;
	}

	.image-fields {
		grid-template-columns: 1fr;
	}

	.admin-news-item {
		grid-template-columns: 86px minmax(0, 1fr);
	}

	.admin-news-item img {
		width: 86px;
	}

	.admin-row-actions {
		grid-column: 1 / -1;
		justify-content: flex-start;
	}

	.admin-title-row {
		flex-direction: column;
	}

	.report-metrics,
	.report-grid {
		grid-template-columns: 1fr;
	}

	.render-chart {
		grid-template-columns: repeat(18, minmax(42px, 1fr));
		padding: 12px;
	}
}
