:root {
	color-scheme: light;
	--ink: #1c2430;
	--muted: #5c6b7a;
	--line: #d5dde6;
	--paper: #fff;
	--bg: #eef2f6;
	--accent: #1f4e79;
	--accent-dark: #163a5c;
	--notice: #e7f2ea;
	--error: #fdecea;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font: 16px/1.5 "Segoe UI", Arial, sans-serif;
	color: var(--ink);
	background: var(--bg);
}

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

img { max-width: 100%; height: auto; }

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

.skip {
	position: absolute;
	left: 12px;
	top: -40px;
	background: #fff;
	padding: 6px 10px;
}
.skip:focus { top: 8px; }

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.site-header {
	background: var(--paper);
	border-bottom: 1px solid var(--line);
}

.head-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 0 8px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--ink);
	text-decoration: none;
}
.brand img {
	display: block;
	width: 84px;
	height: 84px;
	object-fit: contain;
}
.brand-kicker {
	display: block;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.2;
}
.brand-name {
	display: block;
	color: var(--accent);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.1;
}

.search { display: flex; gap: 8px; }
.search input, .filter input, .filter select, .editor input, .editor select, .editor textarea, .admin input[type="text"], .admin input[type="search"] {
	font: inherit;
	border: 1px solid var(--line);
	border-radius: 4px;
	padding: 6px 8px;
	background: #fff;
}
.search input { width: 180px; }

button, .button {
	font: inherit;
	background: var(--accent);
	color: #fff;
	border: 0;
	border-radius: 4px;
	padding: 7px 12px;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
}
button:hover, .button:hover { background: var(--accent-dark); color: #fff; }

.top-nav { padding-bottom: 12px; }
.top-block { margin: 0; }
.top-block h2 { display: none; }
.top-block .menu, .top-block .latest {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 18px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.top-block .menu a { font-weight: 600; }
.top-block .menu .menu-changes > a,
.top-block .menu .menu-changes.active > a {
	background: #b45309;
	color: #fff;
	font-weight: 700;
	padding: 6px 14px;
	border-radius: 999px;
	box-shadow: 0 0 0 3px #fde68a;
}
.top-block .menu .menu-changes > a:hover,
.top-block .menu .menu-changes.active > a:hover {
	background: #92400e;
	color: #fff;
}

.cols {
	display: grid;
	grid-template-columns: 270px minmax(0, 1fr);
	gap: 28px;
	align-items: start;
	padding: 24px 0 40px;
}
.cols.no-side { grid-template-columns: 1fr; }

.sidebar {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 8px 14px 14px;
}
.side-block + .side-block { border-top: 1px solid var(--line); margin-top: 8px; }
.side-block h2 {
	font-size: 15px;
	margin: 12px 0 8px;
}
.menu, .latest, .results, .sections { list-style: none; margin: 0; padding: 0; }
.menu ul { list-style: none; margin: 4px 0 4px 14px; padding: 0; }
.menu a, .latest a {
	display: block;
	text-decoration: none;
	padding: 5px 8px;
	border-radius: 4px;
	line-height: 1.35;
}
.menu a:hover, .latest a:hover {
	background: #e8eef5;
	color: var(--accent-dark);
}
.menu li, .latest li { margin: 4px 0; }
.sidebar .menu li { margin: 1px 0; }
.sidebar .menu a { padding: 3px 8px; }
.sidebar .menu ul { margin-top: 1px; margin-bottom: 1px; }
.menu .active > a {
	font-weight: 700;
	color: var(--accent-dark);
	background: #e0e9f3;
}
.sidebar .menu-branch details { margin: 0; }
.sidebar .menu-branch summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 0;
	padding: 3px 8px;
	border-radius: 4px;
	color: var(--accent);
	font-weight: 600;
	line-height: 1.35;
	cursor: pointer;
	list-style: none;
}
.sidebar .menu-branch summary::-webkit-details-marker { display: none; }
.sidebar .menu-branch summary::marker { content: none; }
.sidebar .menu-branch summary::after {
	content: "";
	flex: 0 0 auto;
	width: 7px;
	height: 7px;
	margin-right: 4px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
}
.sidebar .menu-branch details[open] > summary::after {
	transform: translateY(2px) rotate(-135deg);
}
.sidebar .menu-branch summary:hover { background: #e8eef5; color: var(--accent-dark); }
.sidebar .menu-branch.active > details > summary {
	font-weight: 700;
	color: var(--accent-dark);
	background: #e0e9f3;
}

.content {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 20px 22px 28px;
	min-width: 0;
}
.content:focus { outline: none; }

h1 { font-size: 28px; line-height: 1.25; margin: 0 0 12px; }

.crumbs { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.crumbs a { text-decoration: none; }
.meta { color: var(--muted); font-size: 14px; }

.results li { padding: 8px 0; }
.results li + li { border-top: 1px solid var(--line); }
.results a { font-weight: 600; }
#search-status { color: var(--muted); }

.prose h2, .prose h3, .prose h4 { line-height: 1.3; }
.prose p { margin: 0.6em 0; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose img { height: auto; }
.prose table { max-width: 100%; }

.lead { color: var(--ink); margin: 8px 0 14px; }
.more { margin-top: 8px; }

.filter, .split { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 12px 0 16px; }
.filter label, .editor label, .split label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }

table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }
table.list th { font-size: 14px; color: var(--muted); }

.sections li { margin: 0 0 14px; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.pager a, .pager .current {
	min-width: 32px;
	text-align: center;
	padding: 4px 8px;
	border: 1px solid var(--line);
	border-radius: 4px;
	text-decoration: none;
}
.pager .current { background: var(--accent); color: #fff; border-color: var(--accent); }

.site-footer { color: var(--muted); padding: 8px 0 28px; }

.plain { display: grid; place-items: center; min-height: 100vh; }
.plain-card { background: #fff; padding: 24px; border-radius: 8px; width: min(720px, calc(100% - 32px)); }
.plain code { font-size: 14px; }

.admin-bar { background: var(--accent); color: #fff; }
.admin-bar a { color: #fff; }
.admin-bar-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 10px 0; }
.admin-bar nav { display: flex; gap: 14px; }
.admin-main { padding-top: 20px; padding-bottom: 40px; }
.admin .editor { display: flex; flex-direction: column; gap: 12px; max-width: 920px; }
.admin .editor input[type="text"], .admin .editor input[type="number"], .admin .editor select, .admin .editor textarea { width: 100%; }
.admin .tox-statusbar__path .img-width-hint {
	color: var(--muted);
	font-weight: 600;
	white-space: nowrap;
}
.notice, .error { padding: 10px 12px; border-radius: 6px; }
.notice { background: var(--notice); }
.error { background: var(--error); }
.actions { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.actions form { margin: 0; }
.actions button, .inline-danger button { background: transparent; color: var(--accent); padding: 0; }
.inline-danger { margin-top: 16px; }
.upload-box { margin-top: 28px; padding-top: 8px; border-top: 1px solid var(--line); }

.reg h1 { font-size: 28px; margin: 0 0 12px; }
.reg h2 { font-size: 20px; margin: 18px 0 8px; }
.reg .hint { color: var(--muted); font-size: 14px; }
.reg .ok { color: #1d6b3a; }
.reg form.login { display: grid; gap: 8px; max-width: 420px; margin: 16px 0; }
.reg input[type="text"], .reg input[type="email"], .reg select {
	font: inherit;
	border: 1px solid var(--line);
	border-radius: 4px;
	padding: 6px 8px;
	background: #fff;
}
.reg #reg_workspace { margin: 12px 0; }
.reg .reg-window { max-width: 640px; margin: 8px auto; }
.reg .reg-window .top_right { height: 44px; background: url("reg/top_right.png") right top / 37.7% 44px no-repeat; }
.reg .reg-window .top_left { height: 44px; background: url("reg/top_left.png") left top / 39.7% 44px no-repeat; }
.reg .reg-window .top_center { height: 44px; margin-left: 39.7%; margin-right: 37.7%; background: url("reg/top_center.png") center top repeat-x; }
.reg .reg-window .border_right { background: url("reg/border_right.png") right top repeat-y; }
.reg .reg-window .border_left { background: url("reg/border_left.png") left top repeat-y; }
.reg .reg-window .reg-body {
	background: #fff;
	margin: 0 20px 0 19px;
	padding: 8px 16px 14px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}
.reg .reg-window .bottom_right { height: 20px; background: url("reg/bottom_right.png") right top / 20px 20px no-repeat; }
.reg .reg-window .bottom_left { height: 20px; background: url("reg/bottom_left.png") left top / 19px 20px no-repeat; }
.reg .reg-window .bottom_center { height: 20px; margin-left: 19px; margin-right: 20px; background: url("reg/bottom_center.png") center top repeat-x; }
.reg .reg-window h2 { color: var(--accent); font-size: 1.15em; text-align: center; margin: 0; line-height: 1.3; }
.reg .reg-window .reg-hint { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.35; max-width: 34em; }
.reg .reg-window .reg-fields {
	width: 100%;
	max-width: 22.5rem;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.reg .reg-window .sn-row {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin: 0;
	gap: 0;
}
.reg .reg-window .sn-input {
	box-sizing: border-box;
	flex: 0 0 3.25rem;
	width: 3.25rem;
	height: 2.25rem;
	margin: 0;
	padding: 0;
	text-align: center;
	color: var(--accent);
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border: 1px solid #9aa7b5;
	border-radius: 4px;
	background: #fff;
}
.reg .reg-window .sn-sep {
	flex: 0 0 0.75rem;
	width: 0.75rem;
	text-align: center;
	color: var(--muted);
	font-weight: 700;
	line-height: 2.25rem;
}
.reg .reg-window .sn-input:focus {
	outline: 2px solid #9bb6d0;
	border-color: var(--accent);
}
.reg .reg-window .sn-suffix {
	flex: 0 0 3.25rem;
	width: 3.25rem;
	text-align: center;
	color: var(--accent);
	font-weight: 700;
	font-size: 15px;
	white-space: nowrap;
	line-height: 2.25rem;
}
.reg .reg-window .sn-descr {
	box-sizing: border-box;
	width: 100%;
	height: 2.25rem;
	margin: 0;
	border: 1px solid #9aa7b5;
	border-radius: 4px;
	color: var(--ink);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	padding: 0 10px;
	background: #fff;
}
.reg .reg-window .sn-descr:focus {
	outline: 2px solid #9bb6d0;
	border-color: var(--accent);
}
.reg .reg-window #reg_btn,
.reg .reg-window #reg_btn:hover {
	background: var(--accent);
	color: #fff;
	border: 0;
	border-radius: 4px;
	height: 2.25rem;
	padding: 0 16px;
	margin-top: 2px;
}
.reg .reg-window #reg_btn:hover { background: var(--accent-dark); }
.reg .reg-window #reg_btn:disabled,
.reg .reg-window #reg_btn:disabled:hover {
	background: #c5ced8;
	color: #fff;
	opacity: 1;
	cursor: default;
}

@media (max-width: 560px) {
	.reg .reg-window .reg-fields { max-width: 100%; }
	.reg .reg-window .sn-row { flex-wrap: wrap; justify-content: center; gap: 6px; }
	.reg .reg-window .sn-input,
	.reg .reg-window .sn-suffix { flex-basis: 3rem; width: 3rem; height: 2.1rem; line-height: 2.1rem; }
	.reg .reg-window .sn-sep { line-height: 2.1rem; }
	.reg .reg-window .sn-descr,
	.reg .reg-window #reg_btn { height: 2.1rem; }
}
.reg .sn-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 12px 0; }
.reg .sn-row input { width: 4.5em; text-align: center; }
.reg .descr { width: min(100%, 420px); }
.reg table.data { width: 100%; border-collapse: collapse; margin: 12px 0 18px; border: 1px solid #9aa7b5; background: #fff; }
.reg table.data th, .reg table.data td { border: 1px solid #9aa7b5; padding: 6px; text-align: left; vertical-align: top; background: #fff; }
.reg table.data th { color: #fff; font-size: 14px; background: #1f4e79; }
.reg table.pay-renewals th,
.reg table.pay-renewals td {
	text-align: center;
	vertical-align: middle;
}
.reg .org-table td.org-action {
	width: 1%;
	white-space: nowrap;
	text-align: center;
	vertical-align: middle;
	padding: 8px 10px;
}
.reg .org-table #org_name_user_input,
.reg .org-table #org_inn_input {
	width: min(100%, 28rem);
	box-sizing: border-box;
}
.reg .pay-bad td { background: #fdecea; }
.reg .pay-ok td { background: #e7f2ea; }
.reg .deleted { color: var(--muted); }
.reg .small {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 10px;
	font-size: 13px;
	line-height: 1.2;
	vertical-align: middle;
}
.reg button:disabled { opacity: 0.55; cursor: default; }
.reg .tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.reg .lic-list .reg-num { font-family: Consolas, "Courier New", monospace; font-weight: 700; color: var(--accent); white-space: nowrap; }
.reg .lic-list .reg-pwd { font-family: Consolas, "Courier New", monospace; font-weight: 700; white-space: nowrap; }
.reg .lic-list td { vertical-align: middle; }
.reg .lic-list td.lic-open {
	width: 1%;
	white-space: nowrap;
	text-align: center;
	padding: 8px 10px;
	vertical-align: middle;
}
.reg .lic-list button.js-open {
	display: inline-block;
	min-width: 5.5em;
	box-sizing: border-box;
	margin: 0;
	padding: 6px 12px;
	font: inherit;
	font-size: 14px;
	line-height: 1.2;
	color: #fff;
	background: var(--accent);
	border: 0;
	border-radius: 4px;
	cursor: pointer;
	text-align: center;
	vertical-align: middle;
}
.reg .lic-list button.js-open:hover {
	background: var(--accent-dark);
	color: #fff;
}
.reg .lic-list tr.active td { background: #e8f0f8; }
.reg .reg-detail {
	margin: 12px 0 18px;
	border: 1px solid #9aa7b5;
	background: #fff;
	padding: 14px 16px 16px;
}
.reg .reg-detail h2 { margin-top: 0; }
.reg .reg-detail dl { margin: 0; display: grid; grid-template-columns: minmax(140px, 200px) 1fr; gap: 8px 12px; }
.reg .reg-detail dt { color: var(--muted); }
.reg .reg-detail dd { margin: 0; }
.reg .reg-detail .detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.reg .reg-detail .pwd-value { font-family: Consolas, "Courier New", monospace; font-weight: 700; }
.reg [hidden] { display: none !important; }

@media (max-width: 800px) {
	.reg .reg-detail dl { grid-template-columns: 1fr; gap: 2px 0; }
	.reg .reg-detail dt { margin-top: 8px; }
}

@media (max-width: 800px) {
	.cols { grid-template-columns: 1fr; }
	.head-row { flex-direction: column; align-items: stretch; }
	.search input { width: 100%; }
}
