/*
 * CRHD — страница «Рейтинги» v3 (макет Claude Design «Рейтинги v3»).
 * Поверх cr-site-core.css и cr-home.css, всё под `.crh4-page.crr5`.
 */

/* ---------- Первый экран ---------- */

.crr5 .crr5-hero__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
	gap: 32px 48px;
	align-items: center;
}

.crr5 .crr5-hero__main {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

.crr5 .crr5-bc {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 20px;
	font-size: 14px;
	color: var(--ink3);
}

.crh4-page.crr5 .crr5-bc a {
	color: var(--ink3);
}

.crh4-page.crr5 .crr5-bc a:hover {
	color: var(--blue);
}

.crr5 .crr5-bc span:last-child {
	color: var(--ink);
	font-weight: 600;
}

.crr5 .crh5-b {
	color: var(--blue);
}

.crh4-page.crr5 .crh5-h1 {
	margin-top: 16px;
}

.crr5 .crr5-ib {
	flex: none;
	width: 32px;
	height: 32px;
	display: grid;
	place-items: center;
	border-radius: 10px;
	background: var(--blue-l);
	color: var(--blue);
}

.crr5 .crr5-ib--l {
	width: 44px;
	height: 44px;
	border-radius: 12px;
}

/* Популярные рейтинги */
.crr5 .crr5-pop {
	margin-top: 26px;
}

.crr5 .crr5-pop__cap {
	display: block;
	margin-bottom: 10px;
	font-size: 13px;
	color: var(--ink3);
}

.crr5 .crr5-pop__l {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

.crh4-page.crr5 .crr5-pop__b {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 48px;
	padding: 0 16px 0 8px;
	border: 1.5px solid var(--line);
	border-radius: 14px;
	background: #fff;
	transition: border-color .15s, background .15s, transform .15s;
}

.crh4-page.crr5 .crr5-pop__b:hover {
	border-color: var(--blue);
	background: var(--blue-t);
}

.crh4-page.crr5 .crr5-pop__b:active {
	transform: scale(.97);
}

.crr5 .crr5-pop__b b {
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
}

.crr5 .crr5-pop__b i {
	font-style: normal;
	font-size: 14px;
	color: var(--ink3);
}

@media (min-width: 760px) {
	.crr5 .crr5-pop__l {
		flex-direction: row;
		flex-wrap: wrap;
	}
}

/* Визуал: две карточки рейтингов и чипы. Движение и мышь — как на главной (cr-home.js). */
.crh4-page.crr5 .crr5-vis {
	grid-area: auto;
	height: 400px;
	order: 0;
}

.crr5 .crr5-fl--back {
	top: 28px;
	left: 70px;
	right: -30px;
	z-index: 1;
}

.crr5 .crr5-back {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 10px 28px rgba(0, 11, 47, .08);
	opacity: .75;
	transform: rotate(4deg);
	font-size: 15px;
	font-weight: 800;
}

.crr5 .crr5-fl--front {
	top: 78px;
	left: 20px;
	right: 20px;
	z-index: 2;
}

.crr5 .crr5-front {
	padding: 16px;
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 18px 44px rgba(0, 11, 47, .14);
	transform: rotate(-.8deg);
	transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}

.crr5 .crr5-fl--front:hover .crr5-front {
	transform: rotate(0) scale(1.015);
}

.crr5 .crr5-front__h {
	display: flex;
	align-items: center;
	gap: 12px;
}

.crr5 .crr5-front__h > div {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.crr5 .crr5-front__h b {
	font-size: 17px;
	font-weight: 800;
	line-height: 1.15;
}

.crr5 .crr5-front__h small {
	font-size: 12px;
	color: var(--ink3);
}

.crr5 .crr5-top10 {
	flex: none;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--blue-l);
	color: #2f56e0;
	font-size: 12px;
	font-weight: 700;
}

.crr5 .crr5-front__l {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 14px;
	padding-top: 8px;
	border-top: 1px solid var(--line3);
}

.crr5 .crr5-front__l li {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
}

.crr5 .crr5-front .crh4-logo-box {
	--s: 34px !important;
	border-radius: 9px;
}

.crr5 .crr5-front__t {
	flex: 0 1 38%;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.crr5 .crr5-front__t b {
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.crr5 .crr5-front__t small {
	display: flex;
	align-items: center;
	gap: 3px;
	font-size: 12px;
	color: var(--ink3);
}

.crr5 .crr5-front__p {
	flex: none;
	min-width: 34px;
	text-align: right;
	font-size: 17px;
	font-weight: 800;
}

.crr5 .crr5-bar {
	flex: 1;
	min-width: 40px;
	height: 6px;
	border-radius: 3px;
	background: var(--blue-l);
	overflow: hidden;
}

.crr5 .crr5-bar i {
	display: block;
	height: 100%;
	width: var(--w, 0);
	border-radius: inherit;
	background: linear-gradient(90deg, #7f9bff, #4a72ff);
	transform-origin: left center;
}

.crr5 .crr5-front .crr5-bar i {
	animation: crh5-fill 1.1s cubic-bezier(.2, .7, .2, 1) both;
	animation-delay: calc(.15s + var(--k, 0) * .15s);
}

.crr5 .crr5-pl {
	flex: none;
	width: 28px;
	height: 28px;
	display: grid;
	place-items: center;
	border-radius: 8px;
	background: var(--soft);
	color: var(--ink2);
	font-size: 13px;
	font-weight: 700;
}

.crr5 .crr5-pl--1 {
	background: #fff1c2;
	color: #8a5a00;
}

.crr5 .crr5-pl--2 {
	background: #eef1f6;
	color: #3f4b6b;
}

.crr5 .crr5-pl--3 {
	background: #fde6d6;
	color: #9a4a12;
}

.crr5 .crr5-fl--c1 {
	bottom: 26px;
	left: 20px;
	z-index: 3;
}

.crr5 .crr5-fl--c2 {
	bottom: 20px;
	right: 20px;
	z-index: 3;
}

.crr5 .crr5-fl--c3 {
	top: 14px;
	right: 24px;
	z-index: 3;
}

.crr5 .crr5-fl--c1 .crh5-pchip b {
	color: #1fb26b;
	font-size: 10px;
}

@media (max-width: 759px) {
	.crh4-page.crr5 .crr5-vis {
		height: 430px;
	}
	.crr5 .crr5-fl--c1 {
		bottom: 14px;
	}
	.crr5 .crr5-fl--c2 {
		display: none;
	}
	.crr5 .crr5-fl--front {
		top: 74px;
		left: 12px;
		right: 12px;
	}
	.crr5 .crr5-front {
		padding: 14px;
	}
	.crr5 .crr5-front__t {
		flex-basis: 34%;
	}
}

@media (min-width: 1100px) {
	.crh4-page.crr5 .crr5-vis {
		height: 420px;
		border-radius: 32px;
	}
}

/* ---------- Выбор рейтинга ---------- */

.crr5 .crr5-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
	margin-top: 32px;
}

.crr5 .crr5-side {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

.crr5 .crr5-nav {
	padding: 6px 0;
	border-radius: 24px;
	background: #fff;
	overflow: hidden;
}

.crr5 .crr5-g__t {
	padding: 12px 16px;
	background: var(--soft);
	font-size: 13px;
	font-weight: 700;
	color: var(--ink2);
}

.crr5 .crr5-it {
	display: none;
}

.crh4-page.crr5 .crr5-mi {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 16px;
	border-bottom: 1px solid var(--line3);
	color: var(--ink);
}

.crh4-page.crr5 .crr5-mi:hover {
	color: var(--ink);
	background: var(--blue-t);
}

.crr5 .crr5-mi__t {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.crr5 .crr5-mi__t b {
	font-size: 17px;
	font-weight: 800;
}

.crr5 .crr5-mi__t small {
	font-size: 14px;
	color: var(--ink3);
}

.crr5 .crr5-mi__l {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
	font-size: 14px;
	color: var(--ink2);
}

.crr5 .crr5-mi__l b {
	font-size: 14px;
	font-weight: 700;
	color: var(--ink);
}

.crr5 .crr5-mi__l .crh4-logo-box {
	--s: 24px !important;
	border-radius: 7px;
}

.crr5 .crr5-mi__go {
	flex: none;
	align-self: center;
	color: var(--blue);
}

.crr5 .crr5-pvwrap {
	display: none;
}

/* Карточка «Как составлены рейтинги» */
.crr5 .crr5-how {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 24px;
	border-radius: 24px;
	background: #fff;
}

.crr5 .crr5-how h2 {
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -.01em;
}

.crr5 .crr5-how p {
	font-size: 15px;
	line-height: 1.5;
	color: var(--ink2);
}

.crh4-page.crr5 .crr5-how__b {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	align-self: flex-start;
	font-size: 15px;
	font-weight: 700;
	color: #2f56e0;
	text-align: left;
}

.crr5 .crr5-how__f {
	padding-top: 12px;
	border-top: 1px solid var(--line3);
	font-size: 13px;
	color: var(--ink3);
}

.crr5 .crr5-how__f a {
	color: var(--ink3);
	text-decoration: underline;
}

/* ПК: список слева, превью справа */
@media (min-width: 900px) {
	.crr5 .crr5-grid {
		grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
		gap: 24px;
		align-items: start;
	}
	.crr5 .crr5-nav {
		padding: 10px;
	}
	.crr5 .crr5-g__t {
		padding: 14px 12px 6px;
		background: none;
		font-size: 12px;
		letter-spacing: .05em;
		text-transform: uppercase;
		color: var(--ink3);
	}
	.crr5 .crr5-mi {
		display: none !important;
	}
	.crh4-page.crr5 .crr5-it {
		display: flex;
		align-items: center;
		gap: 12px;
		width: 100%;
		height: 52px;
		padding: 0 12px;
		border-radius: 14px;
		color: var(--ink);
		transition: background .15s, color .15s;
	}
	.crh4-page.crr5 .crr5-it:hover {
		background: var(--soft);
	}
	.crh4-page.crr5 .crr5-it[aria-pressed="true"] {
		background: var(--blue-t);
		color: #2f56e0;
	}
	.crr5 .crr5-it .crr5-ib {
		width: 36px;
		height: 36px;
		border-radius: 10px;
		background: var(--blue-t);
	}
	.crr5 .crr5-it[aria-pressed="true"] .crr5-ib {
		background: #fff;
	}
	.crr5 .crr5-it__n {
		flex: 1;
		min-width: 0;
		font-size: 15px;
		font-weight: 600;
		line-height: 1.25;
	}
	.crr5 .crr5-it[aria-pressed="true"] .crr5-it__n {
		font-weight: 700;
	}
	.crr5 .crr5-it__c {
		font-size: 14px;
		color: var(--ink3);
	}
	.crr5 .crr5-pvwrap {
		display: block;
		position: sticky;
		top: 20px;
		min-width: 0;
		padding: 28px;
		border-radius: 24px;
		background: #fff;
	}
}

/* Превью */
.crr5 .crr5-pv {
	animation: crr5-in .25s ease both;
}

@keyframes crr5-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.crr5 .crr5-pv__h {
	display: flex;
	align-items: center;
	gap: 16px;
}

.crr5 .crr5-pv__ic {
	flex: none;
	width: 60px;
	height: 60px;
	display: grid;
	place-items: center;
	border-radius: 16px;
	background: var(--blue-l);
	color: var(--blue);
}

.crh4-page.crr5 .crr5-pv__h h3 {
	font-size: 28px;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -.02em;
}

.crr5 .crr5-pv__u {
	display: block;
	margin-top: 4px;
	font-size: 14px;
	color: var(--ink3);
}

.crr5 .crr5-pv__f {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 24px 0 18px;
}

.crr5 .crr5-pv__f > div {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px 16px;
	border-radius: 16px;
	background: var(--soft);
}

.crr5 .crr5-pv__f small {
	font-size: 13px;
	color: var(--ink3);
}

.crr5 .crr5-pv__f b {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.1;
	white-space: nowrap;
}

.crr5 .crr5-pv__l {
	display: flex;
	flex-direction: column;
}

.crr5 .crr5-pr {
	display: grid;
	grid-template-columns: 32px 40px minmax(0, 2fr) 60px minmax(48px, 1fr) 40px;
	gap: 12px;
	align-items: center;
	min-height: 61px;
	border-top: 1px solid var(--line3);
}

.crr5 .crr5-pr .crh4-logo-box {
	--s: 40px !important;
	border-radius: 10px;
}

.crh4-page.crr5 .crr5-pr__nm {
	font-size: 16px;
	font-weight: 700;
	color: var(--ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.crh4-page.crr5 .crr5-pr__nm:hover {
	color: var(--blue);
}

.crr5 .crr5-pr__r {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 14px;
	font-weight: 600;
}

.crr5 .crr5-pr__p {
	text-align: right;
	font-size: 18px;
	font-weight: 800;
}

.crr5 .crr5-pv:not([hidden]) .crr5-pr .crr5-bar i {
	animation: crh5-fill .8s cubic-bezier(.2, .7, .2, 1) both;
	animation-delay: calc(var(--k, 0) * .06s);
}

.crr5 .crr5-pv__a {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
	margin-top: 22px;
}

.crr5 .crr5-pv__a .crh4-btn {
	height: 52px;
	padding: 0 24px;
	border-radius: 14px;
	font-weight: 700;
}

.crr5 .crr5-pv__a span {
	font-size: 13px;
	color: var(--ink3);
}

.crr5 .crr5-pv__e {
	padding: 32px 0;
	text-align: center;
	color: var(--ink3);
}

/* ---------- Низ страницы ---------- */

.crr5 .crr5-band--forco {
	padding-top: 0;
}

.crr5 .crr5-band--forco .crh5-forco {
	margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
	.crh4-page.crr5 .crr5-front .crr5-bar i {
		animation: crh5-fill 1.1s cubic-bezier(.2, .7, .2, 1) both !important;
		animation-delay: calc(.15s + var(--k, 0) * .15s) !important;
	}
	.crh4-page.crr5 .crr5-pv:not([hidden]) .crr5-pr .crr5-bar i {
		animation: crh5-fill .8s cubic-bezier(.2, .7, .2, 1) both !important;
		animation-delay: calc(var(--k, 0) * .06s) !important;
	}
	.crh4-page.crr5 .crr5-pv {
		animation: crr5-in .25s ease both !important;
	}
}

/* Превью справа едет за прокруткой до конца блока: sticky не работает, если body — свой скролл-контейнер. */
body.crr5-body {
	overflow: visible !important;
	overflow-x: clip !important;
}

@media (min-width: 900px) {
	.crr5 .crr5-pvwrap {
		top: 24px;
	}
}

/* Вопросы на белой полосе: карточки серые, иначе белое на белом. */
.crr5 .crh4-q {
	background: var(--soft);
}
