/*
 * Сторінка автора, «Усі матеріали автора» і «Наша команда» (docs/tz/storinka-avtora.md,
 * частини A, C2, E, G, K; дошки docs/tz/storinka-avtora/maket/). Усі кольори в змінних
 * .author-page і .team-page: темна й контрастна теми панелі доступності наприкінці файлу
 * перевизначають змінні (§15, зразок .svitlo-page у svitlo.css).
 *
 * accessibility.js ставить на body am-theme-dark чи am-theme-contrast, а accessibilit.css фарбує
 * p, span, li, h1–h6 у колір теми з !important. Тому в темах текст компонентів задано правилами
 * body.am-theme-* .author-page .клас з !important: вони сильніші за body.am-theme-* span.
 */

.author-page,
.team-page {
	--au-bg: #FFFFFF;
	--au-card: #FFFFFF;
	--au-line: #E3E6F3;
	--au-head: #000714;
	--au-text: #1A2024;
	--au-muted: #5B6670;
	--au-link: #1F5FD6;
	--au-chip-bg: #EEF3FE;
	--au-chip-ink: #000714;
	--au-chip-line: #EEF3FE;
	--au-btn-bg: #000714;
	--au-btn-ink: #FFFFFF;
	--au-award-ink: #8A6100;
	--au-award-bg: #FBF3DD;
	--au-program-ink: #1F5FD6;
	--au-program-bg: #EEF3FE;
	--au-heat-0: #EBEEF5;
	--au-heat-1: #C2D4FA;
	--au-heat-2: #86ABF5;
	--au-heat-3: #3478F9;
	--au-heat-4: #1745A8;
	--au-heat-line: #EBEEF5;
	--au-bar: #E3E6F3;
	--au-locked-line: #9AA3AE;
	--ach-tile: #F4F6FC;
	--ach-tile-ring: none;
	--ach-tip-bg: #FFFFFF;
	--ach-tip-border: #E3E6F3;
	--ach-tip-border-width: 1px;
	--ach-tip-text: #1E2330;
	--au-mention-bg: linear-gradient(160deg, #EEF3FE 0%, #FFFFFF 70%);
	--au-shadow: 0 1px 2px rgba(0, 7, 20, .06), 0 8px 24px rgba(0, 7, 20, .08);
	--au-photo-ring: #F4F5FC;
	color: var(--au-text);
}

/* Атрибут hidden сильніший за display компонентів (кнопки, які показує js/author.js). */
.author-page [hidden],
.team-page [hidden] {
	display: none !important;
}

/* ------------------------------------------------ сітка сторінки автора */

/* .main-news у style.css дає зверху 120 px (на телефоні 144) і знизу 88 px: це відступи старої
   головної. На профілі й «Нашій команді» відступ над крихтами як у рубрики й тегу (.main-post:
   32 px, на телефоні 20 px), його дає padding контейнера. */
main.main-news.author-page,
main.main-news.team-page {
	margin-top: 0;
	margin-bottom: 0;
}

/* Підказки досягнень (E3) стоять абсолютно й до показу посередині картки: у правій колонці на
   телефоні прихована підказка виходила за край, і сторінка горталася вбік на 58 px. Зсув у межі
   екрана ставить js/author.js; clip відрізає решту, якщо скрипт ще не встиг, і не робить main
   прокручуваним, тож sticky всередині працює. */
main.author-page {
	overflow-x: clip;
}

.author-container {
	padding-top: 32px;
	padding-bottom: 80px;
}

.author-layout {
	display: flex;
	flex-direction: column;
	gap: 32px;
	margin-top: 20px;
}

/* Телефон: одна колонка в порядку ТЗ (крошки, профіль, «Про автора», нагороди, «Про автора
   пишуть», теми, біографія, матеріали, активність, досягнення). Обгортки колонок зникають. */
.author-col {
	display: contents;
}

.author-profile { order: 1; }
.author-about { order: 2; }
.author-awards { order: 3; }
.author-mentions { order: 4; }
.author-topics { order: 5; }
.author-bio { order: 6; }
.author-recent { order: 7; }
.author-activity { order: 8; }
.author-achievements { order: 9; }

@media (min-width: 1024px) {
	.author-layout {
		display: grid;
		grid-template-columns: 384px minmax(0, 1fr);
		gap: 56px;
		align-items: start;
	}

	.author-col {
		display: flex;
		flex-direction: column;
	}

	.author-col--side {
		gap: 20px;
	}

	.author-col--main {
		gap: 44px;
	}
}

/* ------------------------------------------------ картки й заголовки */

.author-card {
	border: 1px solid var(--au-line);
	border-radius: 20px;
	padding: 24px;
	background: var(--au-card);
	box-sizing: border-box;
	min-width: 0;
}

.author-h2 {
	margin: 0;
	font-size: 20px;
	line-height: 26px;
	font-weight: 800;
	color: var(--au-head);
}

.author-h2--big {
	font-size: 28px;
	line-height: 34px;
}

.author-h2--recent {
	font-size: 24px;
	line-height: 30px;
}

.author-page a:focus-visible,
.author-page button:focus-visible,
.team-page a:focus-visible {
	outline: 3px solid var(--au-link);
	outline-offset: 2px;
}

/* ------------------------------------------------ картка профілю */

.author-profile {
	padding: 28px;
	box-shadow: var(--au-shadow);
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.author-profile__head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	text-align: center;
}

.author-profile__photo {
	width: 128px;
	height: 128px;
	border-radius: 999px;
	object-fit: cover;
}

.author-profile__initials {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--au-chip-bg);
	color: var(--au-link);
	font-size: 44px;
	font-weight: 800;
}

.author-profile__name {
	margin: 4px 0 0;
	font-size: 30px;
	line-height: 36px;
	font-weight: 800;
	color: var(--au-head);
}

.author-profile__position {
	font-size: 16px;
	line-height: 22px;
	font-weight: 600;
	color: var(--au-link);
}

.author-profile__since {
	font-size: 14px;
	line-height: 20px;
	color: var(--au-muted);
}

.author-profile__numbers {
	display: flex;
	gap: 12px;
	padding-top: 16px;
	border-top: 1px solid var(--au-line);
}

.author-number {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

.author-number__value {
	font-size: 22px;
	line-height: 26px;
	font-weight: 800;
	color: var(--au-head);
	font-variant-numeric: tabular-nums;
}

.author-number__label {
	font-size: 13px;
	line-height: 18px;
	color: var(--au-muted);
}

.author-socials {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.author-social {
	width: 44px;
	height: 44px;
	border-radius: 999px;
	border: 1.5px solid var(--au-line);
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--au-head);
}

.author-social:hover {
	border-color: var(--au-head);
}

.author-profile__also {
	margin: 0;
	text-align: center;
	font-size: 14px;
	line-height: 20px;
	color: var(--au-muted);
}

.author-profile__also a {
	color: var(--au-link);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ------------------------------------------------ нагороди й програми */

.author-awards {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.author-awards__group {
	margin: 4px 0 0;
	font-size: 15px;
	line-height: 20px;
	font-weight: 800;
	color: var(--au-muted);
}

.author-awards__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.author-award {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.author-award__icon {
	width: 44px;
	height: 44px;
	flex: none;
	border-radius: 999px;
	border: 2px solid;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
}

.author-award--award .author-award__icon {
	background: var(--au-award-bg);
	border-color: var(--au-award-ink);
	color: var(--au-award-ink);
}

.author-award--recognition .author-award__icon {
	background: var(--au-program-bg);
	border-color: var(--au-program-ink);
	color: var(--au-program-ink);
}

.author-award__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.author-award__title {
	font-size: 16px;
	line-height: 22px;
	font-weight: 700;
	color: var(--au-head);
}

a.author-award__title {
	text-decoration: underline;
	text-decoration-color: var(--au-link);
	text-underline-offset: 3px;
}

.author-award__nomination {
	font-size: 14px;
	line-height: 20px;
	color: var(--au-text);
}

.author-award__meta {
	font-size: 14px;
	line-height: 20px;
	color: var(--au-muted);
}

/* ------------------------------------------------ «Про автора пишуть» */

.author-mentions {
	background: var(--au-mention-bg);
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.author-mentions__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.author-mentions__pen {
	flex: none;
	color: var(--au-link);
}

.author-mentions__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.author-mention__link {
	display: flex;
	flex-direction: column;
	gap: 8px;
	text-decoration: none;
	color: inherit;
}

.author-mention__img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 12px;
}

.author-mention__meta {
	display: flex;
	align-items: center;
	gap: 8px;
}

.author-mention__favicon {
	width: 20px;
	height: 20px;
	border-radius: 4px;
	flex: none;
}

.author-mention__source {
	font-size: 14px;
	line-height: 20px;
	font-weight: 600;
	color: var(--au-muted);
	min-width: 0;
}

.author-mention__ext {
	margin-left: auto;
	flex: none;
	color: var(--au-link);
}

.author-mention__title {
	font-size: 17px;
	line-height: 23px;
	font-weight: 700;
	color: var(--au-head);
}

.author-mention__link:hover .author-mention__title {
	text-decoration: underline;
}

/* ------------------------------------------------ «Про автора», теми, біографія */

.author-about,
.author-topics {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.author-about__text {
	margin: 0;
	font-size: 19px;
	line-height: 30px;
	color: var(--au-text);
}

.author-topics__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.author-chip {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 0 14px;
	border-radius: 999px;
	background: var(--au-chip-bg);
	border: 1.5px solid var(--au-chip-line);
	box-sizing: border-box;
	color: var(--au-chip-ink);
	font-size: 14px;
	line-height: 18px;
	font-weight: 600;
	text-decoration: none;
}

.author-chip--rubric {
	background: transparent;
	border-color: var(--au-link);
	color: var(--au-link);
	font-weight: 700;
}

.author-chip:hover {
	border-color: var(--au-head);
}

.author-bio {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.author-bio__text {
	position: relative;
}

/* Згортає скрипт (js/author.js), лише коли текст довший: без скрипта видно все. */
.author-bio.is-collapsible:not(.is-open) .author-bio__text {
	max-height: 150px;
	overflow: hidden;
}

.author-bio.is-collapsible:not(.is-open) .author-bio__text::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 64px;
	background: linear-gradient(transparent, var(--au-bg));
	pointer-events: none;
}

.author-bio.is-open .author-bio__toggle svg {
	transform: rotate(180deg);
}

/* ------------------------------------------------ кнопки */

.author-btn {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 22px;
	border-radius: 999px;
	box-sizing: border-box;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 20px;
	text-decoration: none;
	cursor: pointer;
}

.author-btn--dark {
	background: var(--au-btn-bg);
	color: var(--au-btn-ink);
	border: 0;
}

.author-btn--dark:hover {
	color: var(--au-btn-ink);
	opacity: .9;
}

.author-btn--outline {
	min-height: 44px;
	padding: 0 18px;
	border: 1.5px solid var(--au-head);
	background: transparent;
	color: var(--au-head);
	font-size: 15px;
}

/* ------------------------------------------------ матеріали */

.author-recent {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.author-materials {
	list-style: none;
	margin: 0;
	padding: 0;
	border-bottom: 1px solid var(--au-line);
}

.author-material__link {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 20px;
	align-items: start;
	padding: 14px 0;
	border-top: 1px solid var(--au-line);
	text-decoration: none;
	color: inherit;
}

.author-material__img {
	width: 120px;
	height: 68px;
	object-fit: cover;
	border-radius: 8px;
}

.author-material__text {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.author-material__title {
	font-size: 17px;
	line-height: 23px;
	font-weight: 700;
	color: var(--au-head);
}

.author-material__link:hover .author-material__title {
	text-decoration: underline;
}

.author-material__meta {
	font-size: 14px;
	line-height: 18px;
	color: var(--au-muted);
}

/* ------------------------------------------------ «Усі матеріали автора» (частина G) */

/* Ліва колонка сітки рубрики (main-post, flex-container): забирає все місце поруч із сайдбаром. */
.author-materials-body {
	flex: 1 1 auto;
	min-width: 0;
}

.author-materials-head {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 24px;
}

.author-materials-head__photo {
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: 999px;
	object-fit: cover;
}

.author-materials-head__photo.author-profile__initials {
	font-size: 20px;
}

.author-materials-head__text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.author-materials-head__title {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	font-size: 26px;
	line-height: 32px;
	font-weight: 800;
	color: var(--au-head);
}

.author-materials-head__label {
	font-size: 14px;
	line-height: 18px;
	font-weight: 700;
	color: var(--au-muted);
}

.author-materials-head__name {
	color: var(--au-link);
	text-decoration: none;
}

.author-materials-head__name:hover {
	color: var(--au-link);
	text-decoration: underline;
}

.author-materials-head__meta {
	font-size: 14px;
	line-height: 18px;
	color: var(--au-muted);
}

/* ------------------------------------------------ активність за рік */

.author-activity {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

.author-activity__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px;
}

.author-activity__total {
	font-size: 15px;
	line-height: 20px;
	font-weight: 700;
	color: var(--au-text);
}

.author-heat-scroll {
	overflow-x: auto;
	max-width: 100%;
}

.author-heat {
	position: relative;
	width: 717px;
	padding-top: 20px;
	direction: ltr;
}

.author-heat__months span {
	position: absolute;
	top: 0;
	font-size: 12px;
	line-height: 16px;
	color: var(--au-muted);
	white-space: nowrap;
}

.author-heat__grid {
	display: flex;
	gap: 3px;
}

.author-heat__days {
	display: flex;
	flex-direction: column;
	gap: 3px;
	width: 24px;
	margin-right: 1px;
}

.author-heat__days span {
	height: 10px;
	font-size: 11px;
	line-height: 10px;
	color: var(--au-muted);
}

.author-heat__week {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.author-heat__cell {
	display: block;
	box-sizing: border-box;
	width: 10px;
	height: 10px;
	border-radius: 3px;
	background: var(--au-heat-0);
}

.author-heat__cell.l0 {
	background: var(--au-heat-0);
	border: 1px solid var(--au-heat-line);
}

.author-heat__cell.l1 { background: var(--au-heat-1); }
.author-heat__cell.l2 { background: var(--au-heat-2); }
.author-heat__cell.l3 { background: var(--au-heat-3); }
.author-heat__cell.l4 { background: var(--au-heat-4); }

.author-heat__cell.is-future {
	background: transparent;
	border: 0;
}

.author-heat__legend {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 4px;
	font-size: 13px;
	line-height: 18px;
	color: var(--au-muted);
}

.author-heat__legend span:first-child {
	margin-right: 4px;
}

.author-heat__legend span:last-child {
	margin-left: 4px;
}

/* ------------------------------------------------ досягнення */

.author-achievements {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.author-achievements__head {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.author-achievements__note {
	font-size: 14px;
	line-height: 20px;
	color: var(--au-muted);
}

.author-achievements__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.author-ach {
	display: flex;
	gap: 16px;
	align-items: center;
	padding: 16px;
	border: 1px solid var(--au-line);
	border-radius: 16px;
	background: var(--au-card);
	min-width: 0;
}

/* Плитка з ілюстрацією: світла в усіх темах (лінії рисунка чорні й на темному фоні пропали б),
   у темній і контрастній навколо рамка (--ach-tile-ring). Розетка рівня в лівому верхньому куті. */
.author-ach__tile {
	position: relative;
	flex: none;
	width: 120px;
	height: 120px;
	border-radius: 16px;
	background: var(--ach-tile);
	box-shadow: var(--ach-tile-ring);
}

.author-ach__img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 16px;
}

.author-ach.is-locked .author-ach__img {
	filter: grayscale(1);
	opacity: .45;
}

.author-ach.is-locked {
	border-style: dashed;
	border-color: var(--au-locked-line);
}

.author-ach__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	flex: 1;
}

.author-ach__name {
	font-size: 17px;
	line-height: 22px;
	font-weight: 800;
	color: var(--au-head);
}

.author-ach__level {
	font-size: 13px;
	line-height: 18px;
	font-weight: 700;
	color: var(--au-head);
}

.author-ach.is-locked .author-ach__name,
.author-ach.is-locked .author-ach__level {
	color: var(--au-muted);
}

.author-ach__value {
	font-size: 14px;
	line-height: 20px;
	color: var(--au-text);
}

/* «Хіт»: слово «матеріалі» веде на найпопулярніший матеріал автора (рішення 02.12). */
.author-ach__link {
	color: var(--au-link);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.author-ach__link:hover {
	color: var(--au-link);
	text-decoration-thickness: 2px;
}

.author-ach__bar {
	display: block;
	height: 6px;
	border-radius: 999px;
	background: var(--au-bar);
	overflow: hidden;
	margin-top: 4px;
}

.author-ach__fill {
	display: block;
	height: 6px;
	border-radius: 999px;
}

.author-ach__next {
	font-size: 13px;
	line-height: 18px;
	color: var(--au-muted);
}

/* Підказка досягнення (частина E3): над карткою, якщо згори немає місця, під нею
   (author-ach__tip--below, ставить js/author.js); до 320 px і в межах екрана (--ach-tip-shift з
   того ж скрипта). Показ при наведенні й фокусі із затримкою 150 мс, на дотик клас is-tip-open,
   Esc ховає до відходу курсора чи фокуса (is-tip-dismissed). Прихована visibility: hidden, тож
   читач екрана бере її текст лише як опис картки (aria-describedby), а не двічі. */
.author-ach {
	position: relative;
	cursor: default;
}

.author-ach:focus-visible {
	outline: 2px solid var(--au-link);
	outline-offset: 2px;
}

.author-ach__tip {
	position: absolute;
	left: 50%;
	bottom: calc(100% + 8px);
	z-index: 30;
	box-sizing: border-box;
	width: max-content;
	max-width: min(320px, calc(100vw - 16px));
	padding: 12px 14px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	background: var(--ach-tip-bg);
	border: var(--ach-tip-border-width) solid var(--ach-tip-border);
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(20, 30, 60, .12);
	color: var(--ach-tip-text);
	font-size: 14px;
	line-height: 20px;
	font-weight: 400;
	text-align: left;
	white-space: normal;
	transform: translateX(calc(-50% + var(--ach-tip-shift, 0px)));
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .12s ease, visibility 0s linear .12s;
}

/* Місток через 8 px між карткою й підказкою: курсор переходить на підказку, і вона не зникає. */
.author-ach__tip::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	height: 10px;
}

.author-ach__tip--below {
	bottom: auto;
	top: calc(100% + 8px);
}

.author-ach__tip--below::after {
	top: auto;
	bottom: 100%;
}

.author-ach:hover .author-ach__tip,
.author-ach:focus-within .author-ach__tip,
.author-ach.is-tip-open .author-ach__tip {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity .12s ease .15s, visibility 0s linear .15s;
}

.author-ach.is-tip-dismissed .author-ach__tip {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: none;
}

.author-ach__tip-name {
	font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
	.author-ach__tip,
	.author-ach:hover .author-ach__tip,
	.author-ach:focus-within .author-ach__tip,
	.author-ach.is-tip-open .author-ach__tip {
		transition-property: visibility;
	}
}

/* Розетка рівня (news/author/_badge.phtml): кольори рівнів в атрибутах SVG, однакові в усіх темах. */
.nv-badge {
	position: absolute;
	top: 6px;
	left: 6px;
	width: 36px;
	height: 40px;
}

.nv-badge__num {
	font-family: inherit;
}

/* ------------------------------------------------ телефон */

@media (max-width: 1023px) {
	.author-container {
		padding-top: 20px;
		padding-bottom: 56px;
	}

	.author-profile {
		padding: 24px 20px;
	}

	.author-profile__photo {
		width: 104px;
		height: 104px;
	}

	.author-about__text {
		font-size: 17px;
		line-height: 27px;
	}

	.author-h2--big {
		font-size: 24px;
		line-height: 30px;
	}

	.author-bio.is-collapsible:not(.is-open) .author-bio__text {
		max-height: 120px;
	}

	.author-material__link {
		grid-template-columns: 88px minmax(0, 1fr);
		gap: 14px;
	}

	.author-material__img {
		width: 88px;
		height: 58px;
	}

	.author-material__title {
		font-size: 16px;
		line-height: 21px;
	}

	.author-materials-head__title {
		font-size: 22px;
		line-height: 28px;
	}

	/* Сітка гортається вбік і відкривається на останніх місяцях. */
	.author-heat-scroll {
		direction: rtl;
	}

	.author-ach {
		flex-direction: column;
		align-items: center;
		text-align: center;
		padding: 14px 10px;
	}

	.author-ach__text {
		align-items: center;
		width: 100%;
	}

	.author-ach__bar {
		align-self: stretch;
	}

	.author-ach__tile {
		width: 96px;
		height: 96px;
	}
}

/* ------------------------------------------------ «Наша команда» (частина K, дошки TeamDesk і TeamPhone) */

.team-container {
	padding-top: 32px;
	padding-bottom: 80px;
}

.team-head {
	display: flex;
	flex-direction: column;
	gap: 20px;
	max-width: 840px;
	margin: 16px 0 48px;
}

.team-title {
	margin: 0;
	font-size: 48px;
	line-height: 54px;
	font-weight: 800;
	color: var(--au-head);
}

.team-intro {
	margin: 0;
	font-size: 20px;
	line-height: 31px;
	color: var(--au-text);
}

.team-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 4px 0 0;
	padding: 0;
}

.team-link:hover {
	color: var(--au-head);
	text-decoration: underline;
}

.team-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 48px 32px;
}

.team-member {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.team-member__photo-link {
	align-self: flex-start;
	display: block;
	border-radius: 999px;
}

.team-member__photo {
	display: block;
	width: 112px;
	height: 112px;
	margin-bottom: 10px;
	border: 4px solid var(--au-photo-ring);
	border-radius: 999px;
	box-sizing: border-box;
	object-fit: cover;
}

.team-member__initials {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--au-chip-bg);
	color: var(--au-link);
	font-size: 36px;
	font-weight: 800;
}

.team-member__text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.team-member__heading {
	margin: 0;
	font-size: 20px;
	line-height: 26px;
	font-weight: 800;
}

.team-member__name {
	color: var(--au-head);
	text-decoration: none;
}

.team-member__name:hover {
	color: var(--au-head);
	text-decoration: underline;
}

.team-member__position {
	font-size: 16px;
	line-height: 22px;
	font-weight: 600;
	color: var(--au-link);
}

/* Два рядки «про людину»: обрізка стилями, увесь текст лишається в розмітці. */
.team-member__about {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 16px;
	line-height: 24px;
	color: var(--au-text);
}

.team-socials {
	display: flex;
	min-height: 44px;
	list-style: none;
	margin: 2px 0 0;
	padding: 0 0 0 12px;
}

.team-social {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-left: -12px;
	border-radius: 999px;
	color: var(--au-muted);
}

.team-social:hover {
	color: var(--au-head);
}

.team-former {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: 64px;
}

.team-former__title {
	font-size: 24px;
	line-height: 30px;
}

.team-former__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 40px;
}

.team-former__item {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	min-width: 0;
	padding: 10px 0;
	border-top: 1px solid var(--au-line);
}

.team-former__name {
	font-size: 16px;
	line-height: 22px;
	font-weight: 700;
	color: var(--au-link);
	text-decoration: none;
}

.team-former__name:hover {
	color: var(--au-link);
	text-decoration: underline;
}

.team-former__years {
	flex: none;
	font-size: 14px;
	line-height: 22px;
	color: var(--au-muted);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

@media (max-width: 1023px) {
	.team-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

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

/* Телефон: люди рядками, фото 88 зліва; колишні одною колонкою. */
@media (max-width: 767px) {
	.team-container {
		padding-top: 20px;
		padding-bottom: 56px;
	}

	.team-head {
		gap: 16px;
		margin: 12px 0 28px;
	}

	.team-title {
		font-size: 32px;
		line-height: 38px;
	}

	.team-intro {
		font-size: 17px;
		line-height: 27px;
	}

	.team-grid {
		display: block;
	}

	.team-member {
		flex-direction: row;
		align-items: flex-start;
		gap: 16px;
		padding: 20px 0;
		border-top: 1px solid var(--au-line);
	}

	.team-member__photo {
		width: 88px;
		height: 88px;
		margin-bottom: 0;
	}

	.team-member__initials {
		font-size: 28px;
	}

	.team-member__heading {
		font-size: 18px;
		line-height: 24px;
	}

	.team-member__position {
		font-size: 15px;
		line-height: 20px;
	}

	.team-member__about {
		-webkit-line-clamp: 4;
		font-size: 15px;
		line-height: 22px;
	}

	.team-former {
		margin-top: 40px;
	}

	.team-former__list {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ------------------------------------------------ теми доступності (§15) */

body.am-theme-dark .author-page,
body.am-theme-dark .team-page {
	--au-bg: #000000;
	--au-card: #0F1729;
	--au-line: #2A3550;
	--au-head: #FFFFFF;
	--au-text: #FFFFFF;
	--au-muted: #B9C3D0;
	--au-link: #7CA6FB;
	--au-chip-bg: #16264A;
	--au-chip-ink: #FFFFFF;
	--au-chip-line: #16264A;
	--au-btn-bg: #2757C9;
	--au-btn-ink: #FFFFFF;
	--au-award-ink: #F2C14E;
	--au-award-bg: #2A2410;
	--au-program-ink: #7CA6FB;
	--au-program-bg: #16264A;
	--au-heat-0: #1A2233;
	--au-heat-1: #1E3A78;
	--au-heat-2: #2757C9;
	--au-heat-3: #4F86F7;
	--au-heat-4: #A9C6FF;
	--au-heat-line: #1A2233;
	--au-bar: #2A3550;
	--au-locked-line: #5B6880;
	--ach-tile-ring: 0 0 0 1px #2A3348;
	--ach-tip-bg: #0F1729;
	--ach-tip-border: #2A3348;
	--ach-tip-text: #FFFFFF;
	--au-mention-bg: linear-gradient(160deg, #16264A 0%, #0F1729 70%);
	--au-shadow: none;
	--au-photo-ring: #2A3550;
}

/* Контрастна: усе чорне, текст і рамки жовті, посилання блакитні, кнопка жовта з чорним. */
body.am-theme-contrast .author-page,
body.am-theme-contrast .team-page {
	--au-bg: #000000;
	--au-card: #000000;
	--au-line: #FFFF00;
	--au-head: #FFFF00;
	--au-text: #FFFF00;
	--au-muted: #FFFF00;
	--au-link: #00FFFF;
	--au-chip-bg: #000000;
	--au-chip-ink: #FFFF00;
	--au-chip-line: #FFFF00;
	--au-btn-bg: #FFFF00;
	--au-btn-ink: #000000;
	--au-award-ink: #FFFF00;
	--au-award-bg: #000000;
	--au-program-ink: #00FFFF;
	--au-program-bg: #000000;
	--au-heat-0: #000000;
	--au-heat-1: #4D4D00;
	--au-heat-2: #8C8C00;
	--au-heat-3: #CCCC00;
	--au-heat-4: #FFFF00;
	--au-heat-line: #808000;
	--au-bar: #4D4D00;
	--au-locked-line: #FFFF00;
	--ach-tile-ring: 0 0 0 2px #FFFF00;
	--ach-tip-bg: #000000;
	--ach-tip-border: #FFFF00;
	--ach-tip-border-width: 2px;
	--ach-tip-text: #FFFF00;
	--au-mention-bg: #000000;
	--au-shadow: none;
	--au-photo-ring: #FFFF00;
}

body:is(.am-theme-dark, .am-theme-contrast) .author-page,
body:is(.am-theme-dark, .am-theme-contrast) .team-page {
	background: var(--au-bg);
}

/* Текст компонентів: колір змінної теми, сильніше за body.am-theme-* span з accessibilit.css. */
body:is(.am-theme-dark, .am-theme-contrast) .author-page :is(.author-profile__name, .author-h2, .author-number__value, .author-award__title,
	.author-mention__title, .author-material__title, .author-ach__name, .author-ach__level, .author-social, .author-btn--outline, .author-btn--outline *),
body:is(.am-theme-dark, .am-theme-contrast) .team-page :is(.author-h2, .team-title, .team-member__name, .team-link, .team-link *) {
	color: var(--au-head) !important;
}

body:is(.am-theme-dark, .am-theme-contrast) .author-page :is(.author-about__text, .author-award__nomination, .author-ach__value, .author-activity__total),
body:is(.am-theme-dark, .am-theme-contrast) .team-page :is(.team-intro, .team-member__about) {
	color: var(--au-text) !important;
}

body:is(.am-theme-dark, .am-theme-contrast) .author-page :is(.author-profile__since, .author-number__label, .author-profile__also, .author-award__meta,
	.author-mention__source, .author-material__meta, .author-ach__next, .author-achievements__note, .author-heat__months span, .author-heat__days span,
	.author-heat__legend > span:not(.author-heat__cell), .author-awards__group, .author-ach.is-locked .author-ach__name, .author-ach.is-locked .author-ach__level,
	.author-materials-head__meta, .author-materials-head__label),
body:is(.am-theme-dark, .am-theme-contrast) .team-page :is(.team-former__years, .team-social) {
	color: var(--au-muted) !important;
}

body:is(.am-theme-dark, .am-theme-contrast) .author-page :is(.author-profile__position, .author-profile__also a, .author-chip--rubric, .author-mentions__pen,
	.author-mention__ext, .author-profile__initials, .author-materials-head__name, .author-ach__link),
body:is(.am-theme-dark, .am-theme-contrast) .team-page :is(.team-member__position, .team-former__name, .team-member__initials) {
	color: var(--au-link) !important;
}

body:is(.am-theme-dark, .am-theme-contrast) .author-page .author-chip:not(.author-chip--rubric) {
	color: var(--au-chip-ink) !important;
}

body:is(.am-theme-dark, .am-theme-contrast) :is(.author-page, .team-page) :is(.author-btn--dark, .author-btn--dark *) {
	color: var(--au-btn-ink) !important;
}

body:is(.am-theme-dark, .am-theme-contrast) .author-page .author-award--award .author-award__icon {
	color: var(--au-award-ink) !important;
}

body:is(.am-theme-dark, .am-theme-contrast) .author-page .author-award--recognition .author-award__icon {
	color: var(--au-program-ink) !important;
}

/* Підказка досягнення (E3): текст кольором підказки теми, сильніше за body.am-theme-* span;
   тло й рамка з її ж змінних (accessibilit.css не перефарбує їх своїми правилами для span). */
body:is(.am-theme-dark, .am-theme-contrast) .author-page :is(.author-ach__tip, .author-ach__tip *) {
	color: var(--ach-tip-text) !important;
}

body:is(.am-theme-dark, .am-theme-contrast) .author-page .author-ach__tip {
	background: var(--ach-tip-bg) !important;
	border-color: var(--ach-tip-border) !important;
}

/* Смужка до наступного рівня в контрастній жовта: кольори рівнів на чорному не читаються. */
body.am-theme-contrast .author-page .author-ach__fill {
	background: #FFFF00 !important;
}
