/* ============================================================
   НАСТРОЙКИ СТРАНИЦ РАСПИСАНИЯ
   on - показывать (включено), off - скрывать (выключено). Другие значения указаны рядом с настройкой.
   ============================================================ */
:root{
	/* Вкладки. Ссылки на скрытую вкладку ведут на ту же страницу видимой вкладки,
	   по порядку: Неделя, Основное, Итоги, Один день */
	--tab-index:  off; /* Расписание */
	--tab-day:    off; /* Один день  */
	--tab-week:   on;  /* Неделя     */
	--tab-main:   off; /* Основное   */
	--tab-totals: off; /* Итоги      */

	/* Разделы под вкладками */
	--subtab-groups:   on; /* Группы */
	--subtab-teachers: on; /* Преподаватели */
	--subtab-rooms:    on; /* Аудитории */

	/* Кнопка «Настройки» и её пункты */
	--show-settings-btn: on; /* «Настройки» (off - скрыта вместе с пунктами) */
	--show-zoom:         on; /* Масштаб */
	--show-blur-btn:     off; /* Прозрачность */
	--show-print-btn:    on; /* Печать */

	/* Стрелки сортировки в заголовке таблицы */
	--show-sort: on;

	/* При первом открытии (дальше - как выберет посетитель) */
	--blur-default:  on;  /* прозрачная шапка */
	--print-default: off; /* кнопка «Печать» под вкладками */
	--sort-default:  off; /* сортировка: off, az - А-Я, za - Я-А */
	--zoom-default:  100; /* масштаб, %: 80-150, шаг 10 */

	/* Шапка при прокрутке */
	--scroll-hide: brand; /* вниз уезжает: brand - строка с названием, all - вся шапка */
	--scroll-show: all;   /* вверх появляется: all - вся шапка, tabs - вкладки, off - ничего */

	/* Подсветка кнопок под мышью (в любом сочетании) */
	--hover-color:  on;  /* синий текст */
	--hover-fill:   on;  /* заливка */
	--hover-spot:   on;  /* пятно света */
	--hover-border: on;  /* светящийся контур */
	--hover-press:  on;  /* затемнение при нажатии */
}


/* ============================================================
   ЦВЕТА
   ============================================================ */
:root{
	--blue-700:    #1F4FC0;
	--blue-500:    #5983E5;
	--blue-200:    #6A5ACD;
	--blue-150:    #6A5ACD;
	--blue-100:    #ffcf63;
	--blue-50:     #ffcf63;
	--ink:         #000000;
	--ink-dark:    #0F172A;
	--muted:       #4B0082;
	--muted-2:     #000080;
	--white:       #FFFFFF; /* белые плашки: текущая вкладка, «- 100% +», флажки */
	--bg:          #FFFFFF; /* фон страницы, шапки и таблицы, зазоры между ячейками */
	--red:         #E11D48;
	--border:      var(--blue-150);
	--shadow-tabs: 0 2px 8px rgba(31,41,55,.1);
	--shadow-toast: 0 4px 16px rgba(15,23,42,.25); /* всплывающая подсказка «раздел отключён» */

	--print-accent:       var(--blue-700);
	--print-accent-hover: var(--blue-500);
	--print-track:        var(--blue-200);
	--print-thumb:        var(--white);
	
	--print-ink:       #000000;
	--print-paper:     #FFFFFF;
	--print-header-bg: #E6E6E6;
	/* Выделение кнопок при наведении */
	--hover-text-color:   var(--blue-700);
	--hover-fill-color:   color-mix(in srgb, var(--blue-700) 8%, transparent);
	--hover-press-color:  color-mix(in srgb, var(--blue-700) 15%, transparent);
	--hover-spot-color:   color-mix(in srgb, var(--blue-700) 10%, transparent);
	--hover-border-color: color-mix(in srgb, var(--blue-700) 50%, transparent);
	--hover-spot-size:    70px;
	/* уже выбранные кнопки (текущая вкладка и раздел) - нейтральное выделение */
	--hover-static-fill-color:   color-mix(in srgb, var(--ink-dark) 4%, transparent);
	--hover-static-press-color:  color-mix(in srgb, var(--ink-dark) 8%, transparent);
	--hover-static-spot-color:   color-mix(in srgb, var(--muted-2) 5%, transparent);
	--hover-static-border-color: color-mix(in srgb, var(--muted-2) 25%, transparent);
}


/* ============================================================
   РАЗМЕРЫ ШРИФТОВ
   ============================================================ */
:root{
	--table-font-size: 14px; /* таблицы */
	--font-brand:      20px; /* название «Экспресс-расписание» */
	--font-title:      16px; /* заголовок страницы */
	--font-ui:         14px; /* вкладки, разделы, кнопки шапки и «Печать», регуляторы */
	--font-text:       14px; /* текст начальной страницы, дата над таблицей */
	--font-small:      13px; /* панель печати, «Обновлено», подвал */
	--font-smaller:    12px; /* подписи полей в панели печати */
	--font-tiny:       11px; /* «Сбросить на …» в панели печати */
	--print-font-size: 11px; /* таблица при печати и в предпросмотре */
}

@view-transition{
	navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root){
	animation-duration: 0s;
}

*{ box-sizing: border-box; }

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

body{
	font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	color: var(--ink);
	background: var(--bg);
	margin: 0;
}

a       { color: var(--blue-700); text-decoration: none; }
a:hover { text-decoration: underline; }

div.lrg{
	max-width: 1600px; 
	margin: 0 auto;
	background: var(--bg);
	padding: 16px;
}

div.lrg2{ width: auto !important; }

.brand{
	display: flex;
	gap: 10px;
	font-size: var(--font-brand);
	font-weight: 700;
	letter-spacing: -0.01em;
	background-image: linear-gradient(90deg, var(--ink-dark) 0%, var(--blue-700) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.brand:hover{ text-decoration: none; }

.brand .ico{
	width: 32px;
	height: 32px;
	border-radius: 12px;
	background: var(--blue-100);
	color: var(--ink);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.top-toggles{
	display: flex;
	align-items: center;
	gap: 4px;
	flex-wrap: wrap;
}

.toggle-btn{
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	border: none;
	border-radius: 12px;
	background: none;
	color: var(--muted);
	font-family: inherit;
	font-weight: 600;
	font-size: var(--font-ui);
	cursor: pointer;
	flex-shrink: 0;
}

.toggle-btn .ico-off{ display: none; }
.toggle-btn.active{
	color: var(--muted-2);
}
.toggle-btn.active .ico-on{ display: none; }
.toggle-btn.active .ico-off{ display: block; }

html.no-blur .head-inner{
	background: var(--bg);
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}
html.no-blur .print-panel::before{
	background: var(--bg);
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}

html.hide-print-btn .print-menu{
	display: none;
}

.sticky-head{
	position: sticky;
	top: 0;
	z-index: 100;
	border-bottom: 1px solid var(--border);
}

.head-inner{
	position: relative;
	max-width: 1600px;
	margin: 0 auto;
	padding: 8px;
	background: linear-gradient(to bottom,
		var(--bg) 0, var(--bg) 10px,
		color-mix(in srgb, var(--bg) 60%, transparent) 40px, color-mix(in srgb, var(--bg) 60%, transparent) 100%);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.top-head{
	position: relative;
	z-index: 101;
	max-width: 1600px;
	margin: 0 auto;
	padding: 16px 16px 8px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	background: var(--bg);
}

/* Появление шапки при прокрутке вверх (настройки --scroll-hide и --scroll-show в начале файла).
   Отступы сверху задаёт images/et.js: отрицательный - часть шапки уехала за край экрана */
html.et-headroom .top-head{
	position: sticky;
	top: var(--brand-top, 0);
}
html.et-headroom .sticky-head{ top: var(--tabs-top, 0); }
html.et-head-anim .top-head,
html.et-head-anim .sticky-head{ transition: top .3s cubic-bezier(.4,0,.2,1); }
@media (prefers-reduced-motion: reduce){
	html.et-head-anim .top-head,
	html.et-head-anim .sticky-head{ transition: none; }
}

nav.tabs{
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	background: var(--blue-100);
	border-radius: 16px;
	padding: 6px;
	margin: 0;
}

nav.tabs a, nav.tabs span.cur{
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 8px 12px;
	border-radius: 12px;
	font-weight: 600;
	font-size: var(--font-ui);
	color: var(--muted);
	white-space: nowrap;
}

nav.tabs a:hover{
	text-decoration: none;
}

nav.tabs span.cur{
	background: var(--white);
	color: var(--blue-700);
	box-shadow: var(--shadow-tabs);
}

/* Показ/скрытие вкладок задаётся переменными --tab-* в начале файла */
@container style(--tab-index: off){
	nav.tabs a[data-tab="index"], nav.tabs span.cur[data-tab="index"]{ display: none; }
}
@container style(--tab-day: off){
	nav.tabs a[data-tab="day"], nav.tabs span.cur[data-tab="day"]{ display: none; }
}
@container style(--tab-week: off){
	nav.tabs a[data-tab="week"], nav.tabs span.cur[data-tab="week"]{ display: none; }
}
@container style(--tab-main: off){
	nav.tabs a[data-tab="main"], nav.tabs span.cur[data-tab="main"]{ display: none; }
}
@container style(--tab-totals: off){
	nav.tabs a[data-tab="totals"], nav.tabs span.cur[data-tab="totals"]{ display: none; }
}

/* Раздел «Группы / Преподаватели / Аудитории»: то же самое, через --subtab-* и data-subtab. */
@container style(--subtab-groups: off){
	.subnav a[data-subtab="groups"], .subnav span.cur[data-subtab="groups"]{ display: none; }
}
@container style(--subtab-teachers: off){
	.subnav a[data-subtab="teachers"], .subnav span.cur[data-subtab="teachers"]{ display: none; }
}
@container style(--subtab-rooms: off){
	.subnav a[data-subtab="rooms"], .subnav span.cur[data-subtab="rooms"]{ display: none; }
}

/* Кнопки «Прозрачность» и «Печать» в шапке */
@container style(--show-blur-btn: off){
	#toggleBlurBtn{ display: none; }
}
@container style(--show-print-btn: off){
	#toggleHidePrintBtn,
	.print-menu{ display: none; }
}

.print-btn{
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	margin: 0 0 16px;
	border: none;
	border-radius: 12px;
	background: none;
	color: var(--muted);
	font-family: inherit;
	font-weight: 600;
	font-size: var(--font-ui);
	cursor: pointer;
	flex-shrink: 0;
}
.print-btn .lbl{ text-align: center; }

.print-menu{
	position: absolute;
	top: 100%;
	right: max(28px, calc(50% - 772px));
	margin-top: 12px;
	width: max-content;
	transition: width .3s cubic-bezier(.4,0,.2,1);
}
.print-menu .print-btn{
	margin: 0;
	width: 100%;
	position: relative;
	z-index: 2;
}
.print-btn .chev{ transition: transform .3s ease; }
.print-btn.open .chev{ transform: rotate(180deg); }

.print-panel{
	position: absolute;
	top: 100%;
	left: 0;
	width: 100%;
	z-index: 1;
	height: 0;
	/* overflow не ставить: ::before намеренно выходит за границы бокса */
	transition: height .3s cubic-bezier(.4,0,.2,1);
}

.print-panel::before{
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: calc(-1 * var(--print-btn-h, 35px));
	bottom: 0;
	z-index: -1;
	background: color-mix(in srgb, var(--bg) 50%, transparent);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	border: 1px solid var(--border);
	border-radius: 12px;
	box-shadow: var(--shadow-tabs);
}

.print-panel-inner{
	height: 100%;
	overflow: hidden;
	border-radius: 12px;
}
.print-panel-content{
	width: 250px;
	padding: 8px;
}

.print-opt{
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 4px;
	font-size: var(--font-small);
	font-weight: 600;
	color: var(--muted);
	cursor: pointer;
}
.print-opt:hover{ color: var(--blue-700); }

.print-opt input[type="checkbox"]{
	appearance: none;
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	margin: 0;
	flex-shrink: 0;
	border: 2px solid var(--print-track);
	border-radius: 4px;
	background: var(--white);
	cursor: pointer;
	position: relative;
	transition: background-color .15s ease, border-color .15s ease;
}
.print-opt input[type="checkbox"]:hover{
	border-color: var(--print-accent-hover);
}
.print-opt input[type="checkbox"]:checked{
	background: var(--print-accent);
	border-color: var(--print-accent);
}
.print-opt input[type="checkbox"]:checked:hover{
	background: var(--print-accent-hover);
	border-color: var(--print-accent-hover);
}
.print-opt input[type="checkbox"]:focus-visible{
	outline: 2px solid var(--print-accent);
	outline-offset: 1px;
}
.print-opt input[type="checkbox"]:checked::after{
	content: "";
	position: absolute;
	left: 3px;
	top: 0px;
	width: 4px;
	height: 8px;
	border: solid var(--white);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.print-margins{
	margin-top: 6px;
	padding: 8px 4px 4px;
	border-top: 1px solid var(--border);
}
.print-margins-label{
	display: block;
	margin-bottom: 8px;
	font-size: var(--font-small);
	font-weight: 600;
	color: var(--muted);
}
.print-margins-grid{
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}
.print-margins-grid label{
	display: flex;
	flex-direction: column;
	gap: 3px;
	font-size: var(--font-smaller);
	font-weight: 600;
	color: var(--muted-2);
}
.print-margins-grid input{
	font-family: inherit;
	font-size: var(--font-small);
	color: var(--ink);
	padding: 5px 7px;
	border: 1px solid var(--border);
	border-radius: 8px;
	width: 100%;
}
.print-margins-grid input:focus{ outline: 2px solid var(--blue-200); border-color: var(--blue-700); }

.print-scale{
	margin-top: 6px;
	padding: 8px 4px 4px;
	border-top: 1px solid var(--border);
}
.print-scale-row{
	display: flex;
	align-items: center;
	gap: 6px;
}
.print-scale-row label{
	font-size: var(--font-smaller);
	font-weight: 700;
	color: var(--muted);
	flex-shrink: 0;
}
.print-scale-row input[type="range"]{
	flex: 1 1 auto;
	appearance: none;
	-webkit-appearance: none;
	margin: 0;
	height: 6px;
	border-radius: 3px;
	background: var(--print-track);
	outline: none;
	cursor: pointer;
}
.print-scale-row input[type="range"]::-webkit-slider-runnable-track{
	height: 6px;
	border-radius: 3px;
	background: linear-gradient(to right,
		var(--print-accent) 0%, var(--print-accent) var(--print-scale-pct, 33%),
		var(--print-track) var(--print-scale-pct, 33%), var(--print-track) 100%);
}
.print-scale-row input[type="range"]::-webkit-slider-thumb{
	appearance: none;
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	margin-top: -5px;
	border-radius: 50%;
	background: var(--print-thumb);
	border: 2px solid var(--print-accent);
	cursor: pointer;
	transition: border-color .15s ease;
}
.print-scale-row input[type="range"]:hover::-webkit-slider-thumb{
	border-color: var(--print-accent-hover);
}
.print-scale-row input[type="range"]::-moz-range-track{
	height: 6px;
	border-radius: 3px;
	background: var(--print-track);
}
.print-scale-row input[type="range"]::-moz-range-progress{
	height: 6px;
	border-radius: 3px;
	background: var(--print-accent);
}
.print-scale-row input[type="range"]::-moz-range-thumb{
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--print-thumb);
	border: 2px solid var(--print-accent);
	cursor: pointer;
	transition: border-color .15s ease;
}
.print-scale-row input[type="range"]:hover::-moz-range-thumb{
	border-color: var(--print-accent-hover);
}
.print-scale-row input[type="range"]:focus-visible::-webkit-slider-thumb,
.print-scale-row input[type="range"]:focus-visible::-moz-range-thumb{
	outline: 2px solid var(--print-accent);
	outline-offset: 2px;
}
.print-scale-row input[type="number"]{
	width: 56px;
	font-family: inherit;
	font-size: var(--font-small);
	color: var(--ink);
	padding: 5px 6px;
	border: 1px solid var(--border);
	border-radius: 8px;
	text-align: right;
}
.print-scale-row input[type="number"]:focus{ outline: 2px solid var(--blue-200); border-color: var(--blue-700); }
.print-scale-row .print-scale-unit{
	font-size: var(--font-small);
	color: var(--muted-2);
}
.print-scale-reset:hover{ color: var(--blue-700); }
.print-scale-reset{
	margin-top: 6px;
	font-size: var(--font-tiny);
	font-weight: 600;
	color: var(--muted);
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	text-decoration: underline;
}

.print-go{
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	margin-top: 10px;
	padding: 8px 12px;
	border: none;
	border-radius: 10px;
	background: var(--blue-100);
	color: var(--muted);
	font-family: inherit;
	font-weight: 600;
	font-size: var(--font-small);
	cursor: pointer;
}

h1{
	font-family: inherit;
	font-size: var(--font-title);
	font-weight: 600;
	color: var(--ink);
	background: none;
	display: flex;
	gap: 8px;
	margin: 0 0 16px;
}
h1 .arrow{
	width: 24px;
	height: 24px;
	border-radius: 12px;
	background: var(--blue-100);
	color: var(--blue-700);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

h1 b{
	font-weight: 700;
}

.subnav{
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin: 0;
}

.subnav a, .subnav span.cur{
	display: flex;
	flex: 1 1 0%;
	max-width: 200px;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 16px;
	margin-bottom: -9px;
	font-weight: 600;
	font-size: var(--font-ui);
	color: var(--muted);
	border-bottom: 2px solid transparent;
}
.subnav a:hover{
	text-decoration: none;
}

.subnav span.cur{
	color: var(--blue-700);
	border-bottom-color: var(--blue-700);
	cursor: default;
}

.table-wrap{
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 12px;
	overflow-x: auto;
	overflow-y: hidden;
	margin-bottom: 12px;
}
.table-wrap::-webkit-scrollbar{ height: 16px; }
.table-wrap::-webkit-scrollbar-track{ background: transparent; }
.table-wrap::-webkit-scrollbar-thumb{ background: var(--blue-100); border-radius: 8px; }
.table-wrap::-webkit-scrollbar-thumb:hover{ background: var(--blue-200); }
.table-wrap{ scrollbar-width: auto; scrollbar-color: var(--blue-100) transparent; }

table.inf, table.lrg{
	width: max-content;
	min-width: 100%;
	border-collapse: collapse;
}

table.inf td, table.inf th{
	border: 2px solid var(--bg);
}
/* Границы ячеек: чтобы отключить, в шаблоне .htm у главной таблицы class="inf no-borders" */
table.inf.no-borders td, table.inf.no-borders th{
	border: none;
}
/* В предпросмотре печати и при печати нужна полная сетка, поэтому там эти правила не действуют. */
@media screen{
	body:not(.print-preview-active) table.inf > tbody:first-child > tr:first-child > td,
	body:not(.print-preview-active) table.inf > tbody:first-child > tr:first-child > th{ border-top: none; }

	body:not(.print-preview-active) table.inf > tbody:last-child > tr:last-child > td,
	body:not(.print-preview-active) table.inf > tbody:last-child > tr:last-child > th,
	body:not(.print-preview-active) table.inf > tbody:last-child > tr > td[rowspan]{ border-bottom: none; }

	body:not(.print-preview-active) table.inf td:first-child,
	body:not(.print-preview-active) table.inf th:first-child{ border-left: none; }

	body:not(.print-preview-active) table.inf td:last-child,
	body:not(.print-preview-active) table.inf th:last-child{ border-right: none; }
}

td.hd{
	background: var(--blue-200);
	color: var(--ink);
	font-weight: 700;
	font-family: inherit;
	font-size: var(--table-font-size);
	padding: 6px;
	white-space: nowrap;
}
td.hd0{
	background: var(--bg);
	color: var(--ink);
	font-weight: 700;
	font-family: inherit;
	font-size: var(--table-font-size);
	padding: 6px;
	white-space: nowrap;
}
td.ur, td.urlt{
	text-align: center;
	background: var(--blue-100) !important;
	color: var(--ink);
	font-family: inherit;
	font-size: var(--table-font-size);
	padding: 6px;
}
td.urlt{ cursor: pointer; }
td.vp{
	background: var(--blue-100);
	color: var(--ink);
	font-family: inherit;
	font-size: var(--table-font-size);
	padding: 6px;
}
/* картинку прячем сразу, чтобы она не мелькала до отработки скрипта */
td.vp img[src*="graf"]{ display: none; }
td.vp .pct{
	display: block;
	padding-left: 2px;
	white-space: nowrap;
}
td.nul{
	background: var(--blue-50);
	color: var(--ink);
	font-family: inherit;
	font-size: var(--table-font-size);
	padding: 6px;
}
td.no{
	background: var(--blue-50);
	color: var(--ink);
	font-family: inherit;
	font-size: var(--table-font-size);
	padding: 6px;
}

div.lrg2 p, div.lrg2 ul{
	text-align: left;
	font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: var(--font-text);
	color: var(--ink);
}
div.lrg2 ul{ padding-left: 20px; }
div.lrg2 li{ margin-bottom: 12px; }

a.z0, a.z1{ color: var(--ink); font-size: var(--table-font-size); font-weight: 700; }
a.z2{ color: var(--ink); }
a.z3{ color: var(--muted-2); }
a.hd{ color: var(--ink); }

ul.zg{ text-align: left; font-size: var(--font-text); font-weight: 700; margin-top: 0; }
ul.zg a{ color: var(--red); }
li.zgr{ color: var(--red); }

div.ref{
	width: auto;
	text-align: right;
	font-family: inherit;
	font-size: var(--font-small);
	color: var(--muted-2);
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
	margin: 12px 0;
}

hr{
	border: none;
	border-top: 1px solid var(--border);
	margin: 12px 0;
}

div.copy{
	font-family: inherit;
	font-size: var(--font-small);
	color: var(--muted);
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px;
	text-align: left;
}
a.copy{ color: var(--muted); font-weight: 600; }

.brand .lbl,
nav.tabs .lbl,
.subnav .lbl{
	display: inline-block; /* нужно для ::first-letter */
}
.brand .lbl::first-letter,
nav.tabs .lbl::first-letter,
.subnav .lbl::first-letter{
	text-transform: uppercase;
}

/* ============================================================
   АДАПТИВНЫЙ ТЕКСТ У КНОПОК ШАПКИ */
.brand,
.toggle-btn,
nav.tabs a, nav.tabs span.cur,
.subnav a, .subnav span.cur,
.print-btn{
	min-width: 0;
	flex-shrink: 1;
}
.top-head, .top-toggles, nav.tabs, .subnav{
	flex-wrap: nowrap;
}

.subnav a, .subnav span.cur{
	container-type: inline-size;
}
@container (max-width: 84px){ .subnav .lbl{ display: none; } }

.brand .lbl,
.toggle-btn .lbl,
nav.tabs .lbl,
.subnav .lbl,
.print-btn .lbl{
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}

/* Ширина экрана, при которой текст переключается на иконку */
@media screen and (max-width: 320px){
	.brand .lbl{ display: none; }
}
@media screen and (max-width: 560px){
	.toggle-btn .lbl,
	.print-btn .lbl{ display: none; }
}
@media screen and (max-width: 480px){
	nav.tabs .lbl{ display: none; }
}

table.inf:has(td.ur, td.nul, td.no) td.hd:not([style]),
table.inf:has(td.ur, td.nul, td.no) td.hd0:not([style]){
	text-align: center;
}

table.inf td.ur:first-child,
table.inf td.vp:first-child,
table.inf td.nul:first-child,
table.inf td.no:first-child{
	background: var(--blue-200) !important;
	color: var(--ink) !important;
	font-weight: 700;
	text-align: center !important;
}

table.inf td.hd:not([style]):first-child,
table.inf td.hd0:not([style]):first-child{
	text-align: center;
}

table.inf td.hd[rowspan]{
	white-space: normal;
	overflow-wrap: break-word;
	max-width: 100px;
}

table.inf td.hd[width="2%"]{
	width: 40px !important;
	min-width: 40px;
	white-space: normal;
}
table.inf td.hd[width="15%"]{
	width: 40px !important;
	min-width: 40px;
	white-space: normal;
}
table.inf td.hd[width="100%"]{
	width: auto !important;
}

table.inf td.hd-split-cont{
	border-top-style: hidden !important;
}

table.inf td.vp,
table.inf td.nul,
table.inf td.no,
table.inf td.ur,
table.inf td.urlt{
	white-space: normal;
	overflow-wrap: break-word;
	word-break: break-word;
	max-width: 200px;
}
@media print{

	@page{ margin: 10mm 10mm 10mm 10mm; }

	body{ margin: 0; }

	.top-head,
	.sticky-head,
	.print-btn,
	.print-panel,
	div.ref,
	hr,
	div.copy,
	div.lrg2 ul.zg{
		display: none !important;
	}

	div.lrg{
		max-width: none;
		margin: 0;
		padding: 0;
		box-shadow: none;
	}

	div.lrg2 ul.zg{
		margin-top: 0;
	}

	.table-wrap{
		border: none;
		border-radius: 0;
		overflow: visible;
		box-shadow: none;
		padding-right: 1px;
	}

	table.inf, table.lrg{
		width: 100%;
		font-size: var(--print-font-size);
	}

	table.inf td,
	table.inf th,
	table.inf.no-borders td,
	table.inf.no-borders th{
		border: var(--print-line-width, 1px) solid var(--print-ink) !important;
		max-width: none;
	}

	*{
		color: var(--print-ink) !important;
		background: var(--print-paper) !important;
		box-shadow: none !important;
		text-shadow: none !important;
		-webkit-print-color-adjust: exact !important;
		print-color-adjust: exact !important;
		color-adjust: exact !important;
	}

	a{
		color: var(--print-ink) !important;
		text-decoration: none !important;
	}

	/* Селекторы повторяют основные правила ради той же специфичности */
	td.ur, td.urlt{
		background: var(--print-paper) !important;
		color: var(--print-ink) !important;
	}
	table.inf td.ur:first-child,
	table.inf td.vp:first-child,
	table.inf td.nul:first-child,
	table.inf td.no:first-child{
		background: var(--print-header-bg) !important;
		color: var(--print-ink) !important;
	}

	td.hd, td.hd0{
		background: var(--print-header-bg) !important;
		color: var(--print-ink) !important;
	}

	td.hd *, td.hd0 *,
	table.inf td.ur:first-child *,
	table.inf td.vp:first-child *,
	table.inf td.nul:first-child *,
	table.inf td.no:first-child *{
		background: transparent !important;
	}

	body.print-hide-empty tr.print-empty-row{
		display: none !important;
	}

	tr.print-sep-collapsed{
		display: none !important;
	}

	body.print-no-gray td.hd,
	body.print-no-gray td.hd0{
		background: var(--print-paper) !important;
	}
	body.print-no-gray table.inf td.ur:first-child,
	body.print-no-gray table.inf td.vp:first-child,
	body.print-no-gray table.inf td.nul:first-child,
	body.print-no-gray table.inf td.no:first-child{
		background: var(--print-paper) !important;
	}

	body.print-avoid-break tbody.print-block{
		break-inside: avoid;
		page-break-inside: avoid;
	}

	body.print-hide-title h1{
		display: none !important;
	}

	body.print-show-date div.lrg2 ul.zg{
		display: block !important;
	}
}

/* Предпросмотр печати: действует при body.print-preview-active */
@media screen{

	body.print-preview-active .lrg2 .table-wrap{
		border-color: transparent;
		border-radius: 0;
		box-shadow: none;
	}

	body.print-preview-active .lrg2 table.inf,
	body.print-preview-active .lrg2 table.lrg{
		width: 100%;
		font-size: var(--print-font-size);
	}

	body.print-preview-active .lrg2 table.inf td,
	body.print-preview-active .lrg2 table.inf th,
	body.print-preview-active .lrg2 table.inf.no-borders td,
	body.print-preview-active .lrg2 table.inf.no-borders th{
		border: var(--print-line-width, 1px) solid var(--print-ink);
		max-width: none;
	}

	body.print-preview-active .lrg2 *{
		color: var(--print-ink) !important;
		background: var(--print-paper) !important;
		box-shadow: none !important;
		text-shadow: none !important;
	}
	body.print-preview-active .lrg2 a{
		color: var(--print-ink) !important;
		text-decoration: none !important;
	}

	body.print-preview-active .lrg2 td.ur,
	body.print-preview-active .lrg2 td.urlt{
		background: var(--print-paper) !important;
		color: var(--print-ink) !important;
	}
	body.print-preview-active .lrg2 table.inf td.ur:first-child,
	body.print-preview-active .lrg2 table.inf td.vp:first-child,
	body.print-preview-active .lrg2 table.inf td.nul:first-child,
	body.print-preview-active .lrg2 table.inf td.no:first-child{
		background: var(--print-header-bg) !important;
		color: var(--print-ink) !important;
	}

	body.print-preview-active .lrg2 td.hd,
	body.print-preview-active .lrg2 td.hd0{
		background: var(--print-header-bg) !important;
		color: var(--print-ink) !important;
	}
	body.print-preview-active .lrg2 td.hd *,
	body.print-preview-active .lrg2 td.hd0 *,
	body.print-preview-active .lrg2 table.inf td.ur:first-child *,
	body.print-preview-active .lrg2 table.inf td.vp:first-child *,
	body.print-preview-active .lrg2 table.inf td.nul:first-child *,
	body.print-preview-active .lrg2 table.inf td.no:first-child *{
		background: transparent !important;
	}

	body.print-preview-active.print-no-gray .lrg2 td.hd,
	body.print-preview-active.print-no-gray .lrg2 td.hd0{
		background: var(--print-paper) !important;
	}
	body.print-preview-active.print-no-gray .lrg2 table.inf td.ur:first-child,
	body.print-preview-active.print-no-gray .lrg2 table.inf td.vp:first-child,
	body.print-preview-active.print-no-gray .lrg2 table.inf td.nul:first-child,
	body.print-preview-active.print-no-gray .lrg2 table.inf td.no:first-child{
		background: var(--print-paper) !important;
	}

	body.print-preview-active.print-hide-empty .lrg2 tr.print-empty-row{
		display: none;
	}
	body.print-preview-active .lrg2 tr.print-sep-collapsed{
		display: none;
	}

	body.print-preview-active.print-hide-title .lrg2 h1{
		display: none;
	}

	body.print-preview-active .lrg2 div.ref,
	body.print-preview-active .lrg2 hr,
	body.print-preview-active .lrg2 div.copy,
	body.print-preview-active .lrg2 ul.zg{
		display: none;
	}
	body.print-preview-active.print-show-date .lrg2 ul.zg{
		display: block;
	}
}

/* Иконки: рисуются стилями (маской), поэтому видны сразу, ещё до загрузки скрипта.
   Цвет иконки - цвет текста кнопки. */
i[data-ico]{
	display: inline-block;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	background-color: currentColor;
	-webkit-mask: var(--ico) center / contain no-repeat;
	mask: var(--ico) center / contain no-repeat;
}
.print-go i[data-ico], div.ref i[data-ico]{ width: 14px; height: 14px; }
.print-btn i[data-ico].chev{ width: 12px; height: 12px; }
i[data-ico="cal"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='3'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E"); }
i[data-ico="cal2"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E"); }
i[data-ico="week"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3Cpath d='M8 14h.01'%3E%3C/path%3E%3Cpath d='M12 14h.01'%3E%3C/path%3E%3Cpath d='M16 14h.01'%3E%3C/path%3E%3C/svg%3E"); }
i[data-ico="drop"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z'%3E%3C/path%3E%3C/svg%3E"); }
i[data-ico="drop-off"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z'%3E%3C/path%3E%3Cline x1='3' y1='3' x2='21' y2='21'%3E%3C/line%3E%3C/svg%3E"); }
i[data-ico="printer"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 6 2 18 2 18 9'%3E%3C/polyline%3E%3Cpath d='M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'%3E%3C/path%3E%3Crect x='6' y='14' width='12' height='8'%3E%3C/rect%3E%3C/svg%3E"); }
i[data-ico="printer-off"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 6 2 18 2 18 9'%3E%3C/polyline%3E%3Cpath d='M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2'%3E%3C/path%3E%3Crect x='6' y='14' width='12' height='8'%3E%3C/rect%3E%3Cline x1='2' y1='2' x2='22' y2='22'%3E%3C/line%3E%3C/svg%3E"); }
i[data-ico="home"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'%3E%3C/path%3E%3Cpolyline points='9 22 9 12 15 12 15 22'%3E%3C/polyline%3E%3C/svg%3E"); }
i[data-ico="sun"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='5'%3E%3C/circle%3E%3Cline x1='12' y1='1' x2='12' y2='3'%3E%3C/line%3E%3Cline x1='12' y1='21' x2='12' y2='23'%3E%3C/line%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'%3E%3C/line%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'%3E%3C/line%3E%3Cline x1='1' y1='12' x2='3' y2='12'%3E%3C/line%3E%3Cline x1='21' y1='12' x2='23' y2='12'%3E%3C/line%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'%3E%3C/line%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'%3E%3C/line%3E%3C/svg%3E"); }
i[data-ico="list"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='8' y1='6' x2='21' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='12' x2='21' y2='12'%3E%3C/line%3E%3Cline x1='8' y1='18' x2='21' y2='18'%3E%3C/line%3E%3Cline x1='3' y1='6' x2='3.01' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='12' x2='3.01' y2='12'%3E%3C/line%3E%3Cline x1='3' y1='18' x2='3.01' y2='18'%3E%3C/line%3E%3C/svg%3E"); }
i[data-ico="pie"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.21 15.89A10 10 0 1 1 8 2.83'%3E%3C/path%3E%3Cpath d='M22 12A10 10 0 0 0 12 2v10z'%3E%3C/path%3E%3C/svg%3E"); }
i[data-ico="users"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='9' cy='7' r='4'%3E%3C/circle%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'%3E%3C/path%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'%3E%3C/path%3E%3C/svg%3E"); }
i[data-ico="teacher"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='8.5' cy='7' r='4'%3E%3C/circle%3E%3Cpolyline points='17 11 19 13 23 9'%3E%3C/polyline%3E%3C/svg%3E"); }
i[data-ico="room"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='2' width='16' height='20' rx='2'%3E%3C/rect%3E%3Cpath d='M10 9h.01'%3E%3C/path%3E%3Cpath d='M10 13h.01'%3E%3C/path%3E%3C/svg%3E"); }
i[data-ico="chev"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); }
i[data-ico="arrow"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3Cpolyline points='12 5 19 12 12 19'%3E%3C/polyline%3E%3C/svg%3E"); }
i[data-ico="sort"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 16 7 20 11 16'%3E%3C/polyline%3E%3Cline x1='7' y1='20' x2='7' y2='4'%3E%3C/line%3E%3Cpolyline points='21 8 17 4 13 8'%3E%3C/polyline%3E%3Cline x1='17' y1='4' x2='17' y2='20'%3E%3C/line%3E%3C/svg%3E"); }
i[data-ico="sort-down"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'%3E%3C/line%3E%3Cpolyline points='19 12 12 19 5 12'%3E%3C/polyline%3E%3C/svg%3E"); }
i[data-ico="sort-up"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='19' x2='12' y2='5'%3E%3C/line%3E%3Cpolyline points='5 12 12 5 19 12'%3E%3C/polyline%3E%3C/svg%3E"); }
/* В печати и предпросмотре фон элементов заменяется на белый - иконкам оставляем цвет текста */
@media print{
	i[data-ico]{ background-color: currentColor !important; }
}
body.print-preview-active .lrg2 i[data-ico]{ background-color: currentColor !important; }

/* Сортировка по заголовку колонки (списки и «Один день»): при наведении меняется только цвет текста */
.th-sort{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 0;
	border: none;
	background: none;
	font: inherit;
	color: inherit;
	cursor: pointer;
	transition: color .15s;
	/* частые нажатия на телефоне не увеличивают страницу двойным касанием; щипок двумя пальцами работает */
	touch-action: manipulation;
}
.th-sort:focus-visible{ outline: 2px solid var(--blue-700); outline-offset: 2px; border-radius: 4px; }
.th-sort i[data-ico]{ width: 14px; height: 14px; color: var(--muted-2); }

body.print-preview-active .th-sort i[data-ico]{ display: none !important; }
@media print{
	.th-sort i[data-ico]{ display: none !important; }
}

/* Без подписи у кнопки «Печать» остаются иконка и стрелка - без пустой колонки посередине */
@media screen and (max-width: 560px){
	.print-btn{ grid-template-columns: auto auto; }
}

/* Подменю: пункт - овальная кнопка, как вкладки; черта активного пункта - на внешнем элементе */
.subnav a, .subnav span.cur{
	padding: 6px 3px 5px;
	gap: 0;
}
.subnav .pill{
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 0;
	padding: 8px 12px;
	border-radius: 12px;
}
/* Нажимается и реагирует на мышь только сама пилюля, а не отступы вокруг неё */
.subnav a, .subnav span.cur{ pointer-events: none; }
.subnav .pill{ pointer-events: auto; }
/* На телефонах - без системной подсветки касания (прямоугольник по ссылке):
   нажатие показывает собственный эффект кнопки (--hover-press) по её форме */
:is(.toggle-btn, nav.tabs a, .subnav a, .print-btn, .print-go, .step-ctl button, .th-sort){ -webkit-tap-highlight-color: transparent; }

/* Рамка фокуса с клавиатуры - по пилюле */
.subnav a:focus-visible{ outline: none; }
.subnav a:focus-visible .pill{ outline: 2px solid var(--blue-700); outline-offset: -2px; }

/* ============================================================
   Выделение кнопок при наведении.
   Что включено - настройки --hover-* в начале файла, цвета - --hover-*-color в палитре.
   Пятно и контур следуют за курсором (координаты передаёт images/et.js).
   ============================================================ */
:is(.toggle-btn, nav.tabs a, nav.tabs span.cur, .subnav .pill, .print-btn, .print-go, .step-ctl button){
	position: relative;
	isolation: isolate;
	transition: color .15s;
}
:is(.toggle-btn, nav.tabs a, nav.tabs span.cur, .subnav .pill, .print-btn, .print-go, .step-ctl button)::before,
:is(.toggle-btn, nav.tabs a, nav.tabs span.cur, .subnav .pill, .print-btn, .print-go, .step-ctl button)::after{
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
}
/* заливка и пятно - под текстом кнопки */
:is(.toggle-btn, nav.tabs a, nav.tabs span.cur, .subnav .pill, .print-btn, .print-go, .step-ctl button)::after{
	z-index: -1;
	opacity: 0;
	transition: opacity .2s;
	background:
		radial-gradient(var(--hover-spot-size) circle at var(--rx, 50%) var(--ry, 50%), var(--hv-spot, transparent), transparent 100%),
		var(--hv-fill, transparent);
}
:is(.toggle-btn, nav.tabs a, nav.tabs span.cur, .print-btn, .print-go, .step-ctl button):hover::after,
.subnav :is(a, span.cur):hover .pill::after{
	opacity: 1;
}
:is(.toggle-btn, nav.tabs a, nav.tabs span.cur, .print-btn, .print-go, .step-ctl button):active::after,
.subnav :is(a, span.cur):active .pill::after,
nav.tabs a.et-pressed::after,
.subnav a.et-pressed .pill::after{
	opacity: 1;
	background: var(--hv-press, transparent);
}
/* контур у кнопок рядом с курсором */
:is(.toggle-btn, nav.tabs a, nav.tabs span.cur, .subnav .pill, .print-btn, .print-go, .step-ctl button)::before{
	display: none;
	padding: 1px;
	background: radial-gradient(var(--hover-spot-size) circle at var(--rx, 50%) var(--ry, 50%), var(--hv-border, transparent), transparent 100%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
	opacity: var(--near, 0);
}

/* обычные кнопки - цвета акцента, уже выбранные (текущая вкладка и раздел) - нейтральные */
:is(.toggle-btn, nav.tabs a, .subnav a .pill, .print-btn, .print-go, .step-ctl button){
	--hv-fill:   var(--hover-fill-color);
	--hv-spot:   var(--hover-spot-color);
	--hv-press:  var(--hover-press-color);
	--hv-border: var(--hover-border-color);
}
:is(nav.tabs span.cur, .subnav span.cur .pill){
	--hv-fill:   var(--hover-static-fill-color);
	--hv-spot:   var(--hover-static-spot-color);
	--hv-press:  var(--hover-static-press-color);
	--hv-border: var(--hover-static-border-color);
}
:is(.toggle-btn, nav.tabs a, .print-btn, .print-go, .step-ctl button, .th-sort):hover,
.subnav a:hover{
	color: var(--hover-text-color);
}
/* Вкладка / раздел, на которые нажали: остаются нажатыми, пока открывается новая страница (класс ставит images/et.js) */
nav.tabs a.et-pressed,
.subnav a.et-pressed{
	color: var(--hover-text-color);
}

/* Отключение отдельных эффектов настройками --hover-* */
@container style(--hover-fill: off){
	:is(.toggle-btn, nav.tabs a, .subnav a .pill, .print-btn, .print-go, .step-ctl button),
	:is(nav.tabs span.cur, .subnav span.cur .pill){ --hv-fill: transparent; }
}
@container style(--hover-spot: off){
	:is(.toggle-btn, nav.tabs a, .subnav a .pill, .print-btn, .print-go, .step-ctl button),
	:is(nav.tabs span.cur, .subnav span.cur .pill){ --hv-spot: transparent; }
}
@container style(--hover-border: on){
	:is(.toggle-btn, nav.tabs a, nav.tabs span.cur, .subnav .pill, .print-btn, .print-go, .step-ctl button)::before{ display: block; }
}
@container style(--hover-color: off){
	:is(.toggle-btn, nav.tabs a, .print-btn, .print-go, .step-ctl button):hover,
	.subnav a:hover{ color: var(--muted); }
	.toggle-btn.active:hover{ color: var(--muted-2); }
	.th-sort:hover{ color: inherit; }
	nav.tabs a.et-pressed, .subnav a.et-pressed{ color: var(--muted); }
}
@container style(--hover-press: off){
	:is(.toggle-btn, nav.tabs a, nav.tabs span.cur, .print-btn, .print-go, .step-ctl button):active::after,
	.subnav :is(a, span.cur):active .pill::after,
	nav.tabs a.et-pressed::after,
	.subnav a.et-pressed .pill::after{
		background:
			radial-gradient(var(--hover-spot-size) circle at var(--rx, 50%) var(--ry, 50%), var(--hv-spot, transparent), transparent 100%),
			var(--hv-fill, transparent);
	}
}

/* Пока скрипт перестраивает страницу (заголовок, таблица, сортировка, активный раздел), эти части скрыты,
   чтобы ничего не прыгало. Класс et-wait ставит и снимает images/et.js (не дольше чем через 2,5 с). */
html.et-wait .subnav,
html.et-wait .lrg2{ visibility: hidden; }

/* Плашка об ошибке файлов оформления видна, пока images/et.js не проверит,
   что страница, style.css и et.js одной версии (--et-version в конце файла) */
html.et-ok #et-files{ display: none; }
/* style.css загрузился - в тексте плашки «и style.css» не нужно */
#et-files .et-no-css{ display: none; }

/* Подсказка «раздел отключён» при нажатии на ссылку скрытой вкладки или раздела (показывает images/et.js) */
.et-toast{
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 1000;
	max-width: calc(100% - 32px);
	padding: 10px 16px;
	border-radius: 12px;
	background: var(--ink);
	color: var(--white);
	box-shadow: var(--shadow-toast);
	font-size: var(--font-ui);
	font-weight: 600;
	text-align: center;
	opacity: 0;
	transform: translate(-50%, 8px);
	transition: opacity .2s, transform .2s;
	pointer-events: none;
}
.et-toast.show{ opacity: 1; transform: translate(-50%, 0); }
@media print{ .et-toast{ display: none !important; } }

/* ============================================================
   Настройки в шапке: кнопка «Настройки» раскрывает влево капсулу
   с масштабом страницы, «Прозрачность» и «Печать».
   ============================================================ */

/* Масштаб страницы (задаётся в «Настройках») - так же, как масштаб в предпросмотре печати: zoom области .lrg2.
   В предпросмотре его заменяет масштаб печати (скрипт задаёт zoom прямо у .lrg2), при печати - zoom: 1. */
div.lrg2{ zoom: var(--page-zoom, 1); }
@media print{ div.lrg2{ zoom: 1 !important; } }

/* Значки настроек */
i[data-ico="sliders"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='4' y1='21' x2='4' y2='14'/%3E%3Cline x1='4' y1='10' x2='4' y2='3'/%3E%3Cline x1='12' y1='21' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12' y2='3'/%3E%3Cline x1='20' y1='21' x2='20' y2='16'/%3E%3Cline x1='20' y1='12' x2='20' y2='3'/%3E%3Cline x1='1' y1='14' x2='7' y2='14'/%3E%3Cline x1='9' y1='8' x2='15' y2='8'/%3E%3Cline x1='17' y1='16' x2='23' y2='16'/%3E%3C/svg%3E"); }
i[data-ico="minus"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E"); }
i[data-ico="plus"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E"); }

/* Шапка: при нехватке места первым сжимается название */
.top-head{ flex-wrap: nowrap; gap: 12px; }
.brand{ flex: 0 1 auto; min-width: 32px; overflow: hidden; }
.top-head.brand-icon .brand .lbl{ display: none; }
.top-toggles{ flex: 0 0 auto; }

/* Капсула - как полоса вкладок: отступ 6px со всех сторон, между пунктами 6px, пункты высотой 35px.
   Отрицательный margin - капсула занимает отступы шапки, высота шапки не меняется. */
.set-wrap{
	display: flex;
	align-items: center;
	padding: 6px;
	margin: -6px;
	border-radius: 16px;
	background: transparent;
	transition: background-color .3s;
	/* быстрые нажатия «+» / «-» на телефоне не увеличивают страницу двойным касанием; щипок двумя пальцами работает */
	touch-action: manipulation;
}
.set-wrap.open{ background: var(--blue-100); }
/* открытие без анимации - когда настройки были открыты на предыдущей странице */
.set-wrap.no-anim, .set-wrap.no-anim *{ transition: none !important; }

/* раскрывающаяся часть: ширина 0 -> по содержимому */
.set-slide{
	display: grid;
	grid-template-columns: 0fr;
	transition: grid-template-columns .35s cubic-bezier(.4,0,.2,1);
}
.set-wrap.open .set-slide{ grid-template-columns: 1fr; }
.set-clip{ min-width: 0; overflow: hidden; }
.set-wrap.opened .set-clip{ overflow: visible; }
.set-items{
	display: flex;
	align-items: center;
	gap: 6px;
	width: max-content;
	padding-right: 6px;
}
/* пункты проявляются по очереди. Три класса в селекторе - чтобы правило было сильнее общего transition кнопок
   (выделение при наведении), иначе «Прозрачность» и «Печать» появлялись и пропадали без анимации */
.set-wrap .set-clip .set-items > *{
	opacity: 0;
	transform: translateX(14px);
	transition: opacity .2s, transform .3s cubic-bezier(.4,0,.2,1), color .15s;
}
.set-wrap.open .set-items > *{
	opacity: 1;
	transform: none;
	transition-delay: calc(var(--i, 0) * 45ms + 80ms);
}

/* кнопка «Настройки»: в открытой капсуле - белая плашка, как текущая вкладка */
.set-btn i[data-ico="sliders"]{ transition: transform .35s cubic-bezier(.4,0,.2,1); }
.set-wrap.open .set-btn{ color: var(--blue-700); background: var(--white); box-shadow: var(--shadow-tabs); }
.set-wrap.open .set-btn i[data-ico="sliders"]{ transform: rotate(90deg); }

/* Регулятор «- 100% + Масштаб»: белая плашка высотой с остальные кнопки */
.step-ctl{
	display: flex;
	align-items: center;
	gap: 2px;
	height: 35px;
	padding: 3px;
	border-radius: 12px;
	background: var(--white);
	box-shadow: var(--shadow-tabs);
	color: var(--muted);
	font-size: var(--font-ui);
	font-weight: 600;
	white-space: nowrap;
}
.step-lbl{ display: flex; align-items: center; gap: 6px; padding: 0 6px 0 9px; }
.step-ctl button{
	display: flex;
	align-items: center;
	justify-content: center;
	height: 29px;
	border: none;
	border-radius: 9px;
	background: none;
	font: inherit;
	color: var(--muted);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: color .15s, background-color .15s;
}
.step-btn{ width: 29px; }
.step-val{ min-width: 46px; padding: 0 4px; }
/* неактивная кнопка (край диапазона) - бледная и без эффектов выделения */
.step-ctl button:disabled{ color: var(--blue-200) !important; cursor: default; }
.step-ctl button:disabled::before,
.step-ctl button:disabled::after{ display: none; }

/* Масштаб не 100%: таблица по ширине области, как в предпросмотре печати
   (те же два правила; класс et-zoomed ставит images/et.js) */
html.et-zoomed div.lrg2 table.inf,
html.et-zoomed div.lrg2 table.lrg{ width: 100%; }
html.et-zoomed div.lrg2 table.inf td,
html.et-zoomed div.lrg2 table.inf th{ max-width: none; }
/* при сжатии слова не рвутся посередине: перенос только между словами */
html.et-zoomed div.lrg2 table.inf td,
html.et-zoomed div.lrg2 table.inf th{ word-break: normal; overflow-wrap: normal; }

/* слово с дефисом (группа, класс, время пары) не переносится по дефису - обёртку ставит images/et.js */
table.inf .et-nobr{ white-space: nowrap; }

/* Мало места: у пунктов настроек остаются только значки и «- 100% +» */
.top-head.compact .set-items .lbl{ display: none; }
.top-head.compact .set-items .toggle-btn{ padding: 8px 10px; }
.top-head.compact .step-lbl{ display: none; }
/* Подпись кнопки «Настройки»: когда места мало, сворачивается одновременно с раскрытием списка
   и разворачивается одновременно с его сворачиванием - зеркально, с той же длительностью.
   --set-lbl-w - точная ширина подписи (задаёт images/et.js), чтобы анимация шла ровно от 0 до неё. */
.set-btn .lbl{
	display: inline-block;
	max-width: var(--set-lbl-w, 12em);
	transition: max-width .35s cubic-bezier(.4,0,.2,1), margin-left .35s cubic-bezier(.4,0,.2,1), opacity .25s;
}
/* при сворачивании подпись гаснет ближе к концу - видно, как буквы сменяются многоточием, как при разворачивании */
.top-head.set-mini .set-wrap.open .set-btn .lbl{
	max-width: 0;
	margin-left: -6px;
	opacity: 0;
	transition: max-width .35s cubic-bezier(.4,0,.2,1), margin-left .35s cubic-bezier(.4,0,.2,1), opacity .2s .15s;
}
@media screen and (max-width: 560px){
	.step-lbl{ display: none; }
}

/* Значок масштаба */
i[data-ico="zoom"]{ --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E"); }

/* Показ кнопки «Настройки» и масштаба - настройки --show-settings-btn и --show-zoom в начале файла */
@container style(--show-settings-btn: off){
	.top-toggles{ display: none; }
}
@container style(--show-zoom: off){
	.step-ctl[data-step="zoom"]{ display: none; }
}

/* Версия файлов веб-шаблона: страницы .htm, style.css и images/et.js должны быть одной версии. Не изменять */
:root{ --et-version: 1-beta; }
