/* ==========================================================================
   Crypto Digest — общие стили страниц инструментов (батч A).
   Подключается после theme.css. Токены: --bg --sf --sf2 --tx --mu --ln
   --ac --fill --acs --onac --lk --up --dn --am
   ========================================================================== */

/* --- Служебное ---------------------------------------------------------- */
.cd-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.cd-up { color: var(--up); }
.cd-dn { color: var(--dn); }
.cd-flat { color: var(--mu); }
.cd-am { color: var(--am); }

/* --- Раскладка страницы инструмента ------------------------------------- */
.cd-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.25rem;
	padding: 1.25rem 1rem 2.5rem;
}

@media (min-width: 1024px) {
	.cd-layout {
		grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
		gap: 1.5rem;
		padding: 1.25rem 1.5rem 2.5rem;
	}
}

.cd-main {
	display: flex;
	flex-direction: column;
	gap: 1.125rem;
	min-width: 0;
}

/* --- Крошки, заголовок, подзаголовок ------------------------------------ */
.cd-crumbs {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.8125rem;
	color: var(--mu);
	white-space: nowrap;
	overflow: hidden;
}

.cd-crumbs a { color: inherit; }
.cd-crumbs a:hover { color: var(--lk); }
.cd-crumbs [aria-current] {
	color: var(--tx);
	overflow: hidden;
	text-overflow: ellipsis;
}

.cd-head {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.cd-title {
	margin: 0;
	font-family: Manrope, system-ui, sans-serif;
	font-size: clamp(1.625rem, 4vw, 2.375rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
}

.cd-lead {
	margin: 0;
	max-width: 45rem;
	font-size: 1.0625rem;
	line-height: 1.5;
	color: var(--mu);
}

.cd-h2 {
	margin: 0.5rem 0 0;
	font-family: Manrope, system-ui, sans-serif;
	font-size: clamp(1.25rem, 2.6vw, 1.5rem);
	font-weight: 800;
	letter-spacing: -0.01em;
}

/* --- Карточка виджета --------------------------------------------------- */
.cd-tool {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.25rem;
	background: var(--sf);
	border-radius: 0.875rem;
}

.cd-tool__big {
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: clamp(2rem, 5vw, 3.5rem);
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.02em;
}

/* --- Сетка показателей -------------------------------------------------- */
.cd-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
	gap: 0.5rem;
}

.cd-stat {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	padding: 0.625rem 0.75rem;
	background: var(--bg);
	border-radius: 0.625rem;
}

.cd-stat__label {
	font-size: 0.8125rem;
	color: var(--mu);
}

.cd-stat__value {
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.2;
}

.cd-stat__sub {
	font-size: 0.8125rem;
	color: var(--mu);
}

/* --- Чипы периодов ------------------------------------------------------ */
.cd-periods {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.cd-periods button {
	min-height: 2.75rem;
	padding: 0 0.875rem;
	border: 1px solid var(--ln);
	border-radius: 0.625rem;
	background: var(--bg);
	color: var(--tx);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
}

.cd-periods button[aria-pressed="true"] {
	background: var(--fill);
	border-color: var(--fill);
	color: var(--onac);
}

/* --- Кнопки ------------------------------------------------------------- */
.cd-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	align-self: flex-start;
	min-height: 2.75rem;
	padding: 0 1rem;
	border: 1px solid transparent;
	border-radius: 0.625rem;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}

.cd-btn:hover { text-decoration: none; }

.cd-btn--primary {
	background: var(--fill);
	color: var(--onac);
}

.cd-btn--ghost {
	background: var(--bg);
	border-color: var(--ln);
	color: var(--tx);
}

/* --- Полоса (bar) ------------------------------------------------------- */
.cd-bar {
	position: relative;
	height: 0.5rem;
	border-radius: 0.25rem;
	background: var(--sf2);
	overflow: hidden;
}

.cd-bar__fill {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 0;
	background: var(--ac);
	border-radius: 0.25rem;
	transition: width 0.35s ease;
}

/* --- Шкала (gauge) ------------------------------------------------------ */
.cd-gauge {
	display: block;
	width: 100%;
	max-width: 16.25rem;
	height: auto;
	overflow: visible;
}

.cd-gauge.is-empty { opacity: 0.55; }
.cd-gauge__needle { transition: transform 0.4s ease; }

@media (prefers-reduced-motion: reduce) {
	.cd-gauge__needle,
	.cd-bar__fill { transition: none; }
}

/* --- Живой блок FNG ----------------------------------------------------- */
.cd-fng-live {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
}

@media (min-width: 640px) {
	.cd-fng-live {
		flex-direction: row;
		align-items: center;
	}
}

.cd-fng-live__num {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	text-align: center;
}

@media (min-width: 640px) {
	.cd-fng-live__num { text-align: left; }
}

.cd-fng-zone {
	font-size: 1.0625rem;
	font-weight: 700;
}

.cd-fng-zone.is-dn { color: var(--dn); }
.cd-fng-zone.is-am { color: var(--am); }
.cd-fng-zone.is-up { color: var(--up); }

.cd-fng-upd {
	min-height: 1.25rem;
	font-size: 0.8125rem;
	color: var(--mu);
}

/* --- График ------------------------------------------------------------- */
.cd-chart-block {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.cd-chart-block .cd-h2 {
	margin: 0;
	font-size: 0.8125rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--mu);
}

.cd-chart {
	display: block;
	width: 100%;
	height: 12.5rem;
	overflow: visible;
}

.cd-chart__grid {
	stroke: var(--ln);
	stroke-width: 1;
	stroke-dasharray: 4 4;
	vector-effect: non-scaling-stroke;
}

.cd-chart__line {
	fill: none;
	stroke: var(--ac);
	stroke-width: 2.5;
	stroke-linejoin: round;
	stroke-linecap: round;
	vector-effect: non-scaling-stroke;
}

.cd-chart__area {
	fill: var(--ac);
	opacity: 0.14;
	stroke: none;
}

.cd-chart__xaxis {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.8125rem;
	color: var(--mu);
}

@media (max-width: 639px) {
	.cd-chart { height: 8.75rem; }
}

/* --- Легенда ------------------------------------------------------------ */
.cd-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	font-size: 0.8125rem;
	color: var(--mu);
}

.cd-legend__item {
	display: flex;
	align-items: center;
	gap: 0.375rem;
}

.cd-legend__dot {
	width: 0.75rem;
	height: 0.75rem;
	border-radius: 50%;
	background: var(--ac);
}

.cd-legend__dot--dn { background: var(--dn); }
.cd-legend__dot--am { background: var(--am); }
.cd-legend__dot--up { background: var(--up); }

/* --- Текстовые блоки «как считается / как читать» ----------------------- */
.cd-how {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.cd-how p {
	margin: 0;
	max-width: 48rem;
	font-size: 1.0625rem;
	line-height: 1.6;
}

/* --- FAQ ---------------------------------------------------------------- */
.cd-faq {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.cd-faq details {
	padding: 0.25rem 1rem 0.75rem;
	background: var(--sf);
	border-radius: 0.625rem;
}

.cd-faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	min-height: 2.75rem;
	padding: 0.75rem 0;
	font-family: Manrope, system-ui, sans-serif;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.cd-faq summary::-webkit-details-marker { display: none; }

.cd-faq summary::after {
	content: "";
	flex: 0 0 auto;
	width: 1rem;
	height: 1rem;
	border-right: 0.125rem solid currentColor;
	border-bottom: 0.125rem solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
}

.cd-faq details[open] summary::after {
	transform: rotate(225deg);
}

.cd-faq summary:focus-visible {
	outline: 0.125rem solid var(--ac);
	outline-offset: 0.125rem;
	border-radius: 0.375rem;
}

@media (prefers-reduced-motion: reduce) {
	.cd-faq summary::after { transition: none; }
}

.cd-faq details p {
	margin: 0.25rem 0 0;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: var(--mu);
}

/* --- Панель управления таблицей ----------------------------------------- */
.cd-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.cd-coinsearch {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 2.75rem;
	min-width: min(100%, 16.25rem);
	padding: 0 0.75rem;
	border: 1px solid var(--ln);
	border-radius: 0.625rem;
	background: var(--bg);
	color: var(--mu);
}

.cd-coinsearch input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 2.5rem;
	border: 0;
	background: transparent;
	color: var(--tx);
	font: inherit;
	font-size: 0.875rem;
}

.cd-coinsearch input:focus { outline: none; }

.cd-seg {
	display: inline-flex;
	gap: 0.125rem;
	padding: 0.1875rem;
	background: var(--sf);
	border: 1px solid var(--ln);
	border-radius: 0.625rem;
}

.cd-seg button {
	min-width: 2.75rem;
	min-height: 2.375rem;
	padding: 0 0.625rem;
	border: 0;
	border-radius: 0.375rem;
	background: transparent;
	color: var(--mu);
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 700;
	cursor: pointer;
}

.cd-seg button[aria-pressed="true"] {
	background: var(--bg);
	color: var(--tx);
}

/* --- Таблица ------------------------------------------------------------ */
.cd-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	background: var(--sf);
	border-radius: 0.875rem;
}

.cd-table {
	width: 100%;
	min-width: 44rem;
	border-collapse: collapse;
	font-size: 0.8125rem;
}

.cd-table th,
.cd-table td {
	padding: 0.5rem 1rem;
	border-bottom: 1px solid var(--ln);
	white-space: nowrap;
	vertical-align: middle;
}

.cd-table tbody tr:last-child th,
.cd-table tbody tr:last-child td { border-bottom: 0; }

.cd-table thead th {
	padding: 0;
	background: var(--sf);
	font-weight: 400;
	text-transform: uppercase;
	color: var(--mu);
}

.cd-table__sort {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.25rem;
	width: 100%;
	min-height: 2.75rem;
	padding: 0 1rem;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 0.8125rem;
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	text-transform: uppercase;
	cursor: pointer;
}

.cd-table__sort[data-left="1"] { justify-content: flex-start; }
.cd-table thead th[aria-sort="ascending"] .cd-table__sort,
.cd-table thead th[aria-sort="descending"] .cd-table__sort { color: var(--lk); }

.cd-table thead th[aria-sort="ascending"] .cd-table__sort::after { content: "▲"; font-size: 0.625rem; }
.cd-table thead th[aria-sort="descending"] .cd-table__sort::after { content: "▼"; font-size: 0.625rem; }

.cd-table__num {
	text-align: right;
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-variant-numeric: tabular-nums;
}

.cd-table__coin,
.cd-table__rank { text-align: left; }

.cd-table__rank {
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	color: var(--mu);
}

.cd-table__row { cursor: pointer; }
.cd-table__row:hover { background: color-mix(in srgb, var(--ac) 6%, transparent); }

.cd-coin {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 2.75rem;
	color: inherit;
}

.cd-coin:hover { text-decoration: none; }
.cd-coin:hover .cd-coin__sym { color: var(--lk); }

.cd-coin__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 1.375rem;
	height: 1.375rem;
	border-radius: 50%;
	background: var(--sf2);
	font-size: 0.6875rem;
	font-weight: 700;
	overflow: hidden;
}

.cd-coin__sym { font-weight: 700; }

.cd-coin__name {
	max-width: 9rem;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--mu);
}

.cd-spark {
	display: block;
	margin-left: auto;
}

.cd-spark .cd-chart__line { stroke-width: 2; }

.cd-note {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--mu);
}

/* --- Состояния ---------------------------------------------------------- */
.cd-state {
	margin: 0;
	font-size: 0.875rem;
	color: var(--mu);
}

.cd-state[hidden] { display: none; }
.cd-state--stale { color: var(--am); }
.cd-state--error { color: var(--dn); }
.cd-state--empty { color: var(--mu); }

.cd-state--loading [data-cd-state-msg] {
	display: inline-block;
	position: relative;
	min-width: 8rem;
	min-height: 1em;
	color: transparent;
	background: var(--sf2);
	border-radius: 0.25rem;
	overflow: hidden;
}

.cd-state--loading [data-cd-state-msg]::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--tx) 10%, transparent), transparent);
	animation: cd-skel 1.4s linear infinite;
}

@keyframes cd-skel {
	from { transform: translateX(-100%); }
	to { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
	.cd-state--loading [data-cd-state-msg]::after { animation: none; }
}

/* --- Сетка «Другие инструменты» ----------------------------------------- */
.cd-toolcards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.5rem;
}

.cd-toolcard {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	min-height: 2.75rem;
	padding: 0.625rem 0.75rem;
	background: var(--sf);
	border-radius: 0.625rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: inherit;
}

.cd-toolcard:hover { text-decoration: none; }
.cd-toolcard:hover .cd-toolcard__name { color: var(--lk); }
.cd-toolcard[aria-current="page"] { outline: 1px solid var(--ac); }

.cd-toolcard__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 1.875rem;
	height: 1.875rem;
	border-radius: 0.625rem;
	background: var(--acs);
	color: var(--lk);
}

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

@media (max-width: 480px) {
	.cd-toolcards { grid-template-columns: minmax(0, 1fr); }
}

/* --- Адаптив: таблицы превращаются в карточки --------------------------- */
@media (max-width: 639px) {
	.cd-table-wrap { overflow-x: visible; background: transparent; border-radius: 0; }
	.cd-table { display: block; min-width: 0; }
	.cd-table thead { display: none; }
	.cd-table tbody { display: block; }

	.cd-table__row {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.25rem 0.75rem;
		margin-bottom: 0.5rem;
		padding: 0.5rem 1rem 0.75rem;
		background: var(--sf);
		border-radius: 0.625rem;
	}

	.cd-table__row:hover { background: var(--sf); }

	.cd-table td {
		display: flex;
		align-items: baseline;
		justify-content: space-between;
		gap: 0.5rem;
		padding: 0;
		border: 0;
		text-align: left;
	}

	.cd-table td::before {
		content: attr(data-label);
		font-family: Onest, system-ui, sans-serif;
		font-size: 0.75rem;
		color: var(--mu);
	}

	.cd-table__rank,
	.cd-table__coin { grid-column: 1 / -1; }

	.cd-table__rank::before { content: none; }

	.cd-table__coin::before { content: none; }

	.cd-table__spark { display: none; }

	.cd-coin { min-height: 2.5rem; }
	.cd-coin__name { max-width: none; }
}

/* ===== Этап 5D: стили страниц инструментов, батч 1 (tools, fng, halving) ===== */
/* ==========================================================================
   Crypto Digest — доборные стили страниц инструментов (батч B1).
   ========================================================================== */

/* --- Раскладка витрины инструментов ------------------------------------- */
.cd-tool-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.25rem;
	width: 100%;
	max-width: 80rem;
	margin: 0 auto;
	padding: 1.25rem 1rem 2.5rem;
}

.cd-tool-layout__main {
	display: flex;
	flex-direction: column;
	gap: 1.125rem;
	min-width: 0;
}

@media (min-width: 64rem) {
	.cd-tool-layout {
		grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
		gap: 1.5rem;
		padding: 1.25rem 1.5rem 2.5rem;
	}
}

/* --- Страница инструмента (main) ---------------------------------------- */
.cd-tool-page {
	display: block;
	min-width: 0;
}

.cd-tool-head,
.cd-tool-page__head {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.cd-tool-head h1,
.cd-tool-page__head h1 {
	margin: 0;
	font-family: Manrope, system-ui, sans-serif;
	font-size: clamp(1.625rem, 4vw, 2.375rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
}

.cd-tool-page__head p {
	margin: 0;
	max-width: 45rem;
	font-size: 1.0625rem;
	line-height: 1.5;
	color: var(--mu);
}

/* --- Сайдбар ------------------------------------------------------------ */
.cd-sidebar {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	min-width: 0;
}

/* --- Блок виджета: верхняя строка --------------------------------------- */
.cd-tool__top {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
}

.cd-tool__eyebrow {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--mu);
}

.cd-tool__big-line {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.5rem;
}

.cd-tool__big-line > span {
	font-size: 1rem;
	font-weight: 600;
	color: var(--mu);
}

.cd-tool__big-line small {
	font-size: 0.875rem;
	color: var(--mu);
}

.cd-tool__countdown {
	margin: 0.25rem 0 0;
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.9375rem;
	color: var(--mu);
}

.cd-tool__note {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--mu);
}

/* --- Прогресс халвинга -------------------------------------------------- */
.cd-progress {
	position: relative;
	height: 0.5rem;
	border-radius: 0.25rem;
	background: var(--sf2);
	overflow: hidden;
}

.cd-progress__fill {
	display: block;
	width: 0;
	height: 100%;
	background: var(--ac);
	border-radius: inherit;
	transition: width 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
	.cd-progress__fill { transition: none; }
}

/* --- Таблица: рост ------------------------------------------------------ */
.cd-positive {
	color: var(--up);
	font-weight: 600;
}

/* --- Индекс страха: блок прошлых значений ------------------------------- */
.cd-fng-past {
	margin-top: 0.25rem;
}

/* --- Крупная сетка витрины инструментов --------------------------------- */
.cd-tools-large {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.75rem;
}

@media (min-width: 48rem) {
	.cd-tools-large {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 64rem) {
	.cd-tools-large {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.cd-tools-large__card {
	color: inherit;
	text-decoration: none;
	transition: background 0.2s ease;
}

.cd-tools-large__card:hover {
	background: var(--sf2);
	text-decoration: none;
}

.cd-tools-large__card:focus-visible {
	outline: 0.125rem solid var(--ac);
	outline-offset: 0.125rem;
}

.cd-tools-large__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
}

.cd-tools-large__ico {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 0.75rem;
	background: var(--acs);
	color: var(--lk);
}

.cd-tools-large__ico svg {
	width: 1.375rem;
	height: 1.375rem;
}

.cd-tools-large__live {
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.8125rem;
	color: var(--mu);
	text-align: right;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cd-tools-large__body {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
}

.cd-tools-large__title {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--tx);
}

.cd-tools-large__sub {
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--mu);
}

/* --- Компактная сетка инструментов -------------------------------------- */
.cd-tools-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.5rem;
}

@media (max-width: 63.9375rem) {
	.cd-tools-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 30rem) {
	.cd-tools-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.cd-tools-grid__item,
.cd-tool-link {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 2.75rem;
	padding: 0.5rem 0.75rem;
	background: var(--sf);
	border-radius: 0.625rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: inherit;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.cd-tools-grid__item:hover,
.cd-tool-link:hover {
	background: var(--sf2);
	text-decoration: none;
	color: var(--lk);
}

.cd-tools-grid__item:focus-visible,
.cd-tool-link:focus-visible {
	outline: 0.125rem solid var(--ac);
	outline-offset: 0.125rem;
}

.cd-tools-grid__ico,
.cd-tool-link__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 1.875rem;
	height: 1.875rem;
	border-radius: 0.625rem;
	background: var(--acs);
	color: var(--lk);
}

.cd-tools-grid__ico svg,
.cd-tool-link__icon svg {
	width: 1rem;
	height: 1rem;
}

.cd-tools-grid__name {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* --- Секции «Другие инструменты» ---------------------------------------- */
.cd-other-tools,
.cd-tools-more {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.cd-other-tools h2,
.cd-tools-more h2 {
	margin: 0;
	font-family: Manrope, system-ui, sans-serif;
	font-size: clamp(1.25rem, 2.6vw, 1.5rem);
	font-weight: 800;
	letter-spacing: -0.01em;
}

/* ===== Этап 5D: батч 2 (top100, charts, shortlong, session) ===== */
/* ==========================================================================
   Crypto Digest — доборные стили страниц инструментов (батч B2).
   Покрытие: полосы лонг/шорт, обёртка графика и ось, мини-карточки монет,
   торговые сессии, форма поиска графиков, вкладки, состояния, утилиты.
   ========================================================================== */

/* --- Скрытое для зрячих ------------------------------------------------ */
.cd-visually-hidden,
.cd-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* --- Дополнение к знакам изменения ------------------------------------- */
.cd-negative {
	color: var(--dn);
	font-weight: 600;
}

/* --- Верхняя строка виджета: крупное значение + подпись ---------------- */
.cd-tool__hero-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.375rem 1.25rem;
	min-width: 0;
}

.cd-tool__hero-row > div + div {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.5rem;
	min-width: 0;
}

.cd-tool__hero-row strong {
	font-family: Manrope, system-ui, sans-serif;
	font-weight: 700;
}

.cd-tool__updated {
	margin: 0;
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--mu);
}

/* --- Полосы лонг/шорт --------------------------------------------------- */
.cd-bars {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	min-width: 0;
}

.cd-bar-row {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	min-width: 0;
}

.cd-bar-row__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.25rem 0.75rem;
	min-width: 0;
}

.cd-bar-row__head strong {
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.9375rem;
	font-weight: 700;
}

.cd-bar-row__head span {
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.8125rem;
	color: var(--mu);
	white-space: nowrap;
}

.cd-bar-row__head b {
	font-weight: 700;
}

.cd-bar--split {
	height: 0.75rem;
	border-radius: 0.375rem;
	background: var(--dn);
}

.cd-bar--split .cd-bar__fill {
	background: var(--up);
	border-radius: 0.375rem 0 0 0.375rem;
}

/* Площадка не ответила: вместо красной полосы (фон раздельной полосы — шорты) — серая с «нет данных»
   (сквозная проверка 26.09: у Bybit была сплошная красная полоса с обрезанной надписью). */
.cd-bar--split.is-nodata {
	height: auto;
	background: var(--sf2);
}
.cd-bar__nodata {
	display: block;
	padding: 0.125rem 0.625rem;
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.75rem;
	line-height: 1.4;
	color: var(--mu);
}
.cd-bar__nodata[hidden] { display: none; }

/* --- Обёртка графика и ось под ним -------------------------------------- */
.cd-chart-wrap {
	position: relative;
	width: 100%;
	min-width: 0;
	padding: 0.5rem 0.25rem 0;
	background: var(--bg);
	border-radius: 0.625rem;
	overflow: hidden;
}

.cd-chart-wrap > svg {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 760 / 180;
	max-height: 12.5rem;
	overflow: visible;
}

.cd-chart-axis {
	display: flex;
	justify-content: space-between;
	gap: 0.25rem;
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.75rem;
	color: var(--mu);
}

/* --- Сетка мини-карточек монет ------------------------------------------ */
.cd-coins {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.5rem;
	min-width: 0;
}

.cd-coins > .cd-tool {
	grid-column: 1 / -1;
}

@media (min-width: 48rem) {
	.cd-coins {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 64rem) {
	.cd-coins {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.cd-coin-card {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	min-width: 0;
	padding: 0.75rem;
	background: var(--sf);
	border-radius: 0.75rem;
	color: inherit;
	text-decoration: none;
	transition: background 0.2s ease;
}

.cd-coin-card:hover {
	background: var(--sf2);
	text-decoration: none;
}

.cd-coin-card:focus-visible {
	outline: 0.125rem solid var(--ac);
	outline-offset: 0.125rem;
}

.cd-coin-card__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem;
	min-width: 0;
}

.cd-coin-card__sym {
	display: flex;
	align-items: baseline;
	gap: 0.375rem;
	min-width: 0;
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.cd-coin-card__name {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-family: Onest, system-ui, sans-serif;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--mu);
}

.cd-coin-card__rank {
	flex: 0 0 auto;
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.75rem;
	color: var(--mu);
}

.cd-coin-card__spark {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 2rem;
	overflow: visible;
}

.cd-coin-card__row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.125rem 0.5rem;
	min-width: 0;
}

.cd-coin-card__price {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.9375rem;
	font-weight: 600;
}

.cd-coin-card__delta {
	flex: 0 0 auto;
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.75rem;
	font-weight: 600;
	white-space: nowrap;
}

/* --- Ссылка «все монеты таблицей» --------------------------------------- */
.cd-more-link {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 600;
}

.cd-more-link a {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	color: var(--lk);
	text-decoration: none;
}

.cd-more-link a:hover {
	text-decoration: underline;
}

.cd-more-link a:focus-visible {
	outline: 0.125rem solid var(--ac);
	outline-offset: 0.125rem;
}

/* --- Форма поиска монеты ------------------------------------------------ */
.cd-searchform {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	width: 100%;
	min-width: 0;
	padding: 0.375rem;
	background: var(--sf);
	border-radius: 0.75rem;
}

.cd-searchform input[type="search"] {
	flex: 1 1 10rem;
	min-width: 0;
	min-height: 2.75rem;
	padding: 0 0.875rem;
	border: 1px solid var(--ln);
	border-radius: 0.625rem;
	background: var(--bg);
	color: var(--tx);
	font: inherit;
	font-size: 0.9375rem;
}

.cd-searchform input[type="search"]::placeholder {
	color: var(--mu);
	opacity: 1;
}

.cd-searchform input[type="search"]:focus-visible {
	outline: 0.125rem solid var(--ac);
	outline-offset: 0.0625rem;
}

.cd-searchform button {
	flex: 0 1 auto;
	min-height: 2.75rem;
	padding: 0 1.25rem;
	border: 1px solid transparent;
	border-radius: 0.625rem;
	background: var(--fill);
	color: var(--onac);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 700;
	cursor: pointer;
}

.cd-searchform button:focus-visible {
	outline: 0.125rem solid var(--ac);
	outline-offset: 0.125rem;
}

/* --- Торговые сессии ---------------------------------------------------- */
.cd-session-widget {
	min-width: 0;
}

.cd-session-now {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.25rem 0.75rem;
	font-size: 0.9375rem;
	color: var(--mu);
}

.cd-session-now strong {
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-weight: 600;
	color: var(--tx);
}

.cd-session-scale {
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
	min-width: 0;
}

.cd-session-row {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	min-width: 0;
}

.cd-session-row__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.25rem 0.75rem;
	min-width: 0;
}

.cd-session-row__head strong {
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.875rem;
	font-weight: 700;
}

.cd-session-row__head span {
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.75rem;
	color: var(--mu);
}

.cd-session-track {
	position: relative;
	height: 1.125rem;
	background: var(--sf2);
	border-radius: 0.5625rem;
	overflow: hidden;
}

.cd-session-fill {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 0;
	background: var(--ac);
	border-radius: 0.5625rem;
	opacity: 0.45;
	transition: left 0.35s ease, width 0.35s ease, opacity 0.35s ease;
}

.cd-session-fill.is-active {
	opacity: 1;
}

.cd-session-overlap {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 0;
	background: repeating-linear-gradient(
		45deg,
		var(--ac),
		var(--ac) 0.25rem,
		transparent 0.25rem,
		transparent 0.5rem
	);
	opacity: 0.45;
	border-radius: 0.5625rem;
}

.cd-session-row.is-active [data-session-hours] {
	font-weight: 600;
}

.cd-session-marker {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 0.125rem;
	background: var(--tx);
	opacity: 0.8;
	pointer-events: none;
}

.cd-session-axis {
	display: flex;
	justify-content: space-between;
	gap: 0.25rem;
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.6875rem;
	color: var(--mu);
}

@media (prefers-reduced-motion: reduce) {
	.cd-session-fill,
	.cd-coin-card {
		transition: none;
	}
}

/* --- Состояние «всё хорошо» --------------------------------------------- */
.cd-state--ok {
	color: var(--mu);
}

.cd-state--ok [data-cd-state-msg]:empty {
	display: none;
}

.cd-state--ok:has([data-cd-state-msg]:empty) {
	display: none;
}

/* --- Вкладки-чипы сортировки -------------------------------------------- */
.cd-tabs__btn {
	white-space: nowrap;
}

.cd-tabs__btn.is-active,
.cd-tabs__btn[aria-selected="true"] {
	background: var(--fill);
	border-color: var(--fill);
	color: var(--onac);
}

.cd-tabs__btn:focus-visible {
	outline: 0.125rem solid var(--ac);
	outline-offset: 0.125rem;
}
</final>

/* ===== Этап 5D: батч 3 (calcposition, newposts, coin) ===== */
/* ==========================================================================
   Crypto Digest — доборные стили страниц инструментов (батч B3).
   Классы из page-calcposition / page-newposts / coin.php.
   ========================================================================== */

/* --- Скрытое для зрячих ------------------------------------------------- */
.cd-sr-only,
.cd-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* --- Универсальные кнопки ----------------------------------------------- */
.cd-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 2.75rem;
	padding: 0 1rem;
	border: 1px solid transparent;
	border-radius: 0.625rem;
	background: var(--sf2);
	color: var(--tx);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.cd-button:hover { text-decoration: none; }

.cd-button:focus-visible {
	outline: 0.125rem solid var(--ac);
	outline-offset: 0.125rem;
}

.cd-button[disabled],
.cd-button[aria-disabled="true"] {
	opacity: 0.5;
	cursor: not-allowed;
}

.cd-button--primary {
	background: var(--fill);
	border-color: var(--fill);
	color: var(--onac);
}

.cd-button--ghost {
	background: var(--bg);
	border-color: var(--ln);
	color: var(--tx);
}

.cd-button--ghost:hover { background: var(--sf2); }

.cd-button--icon {
	width: 2.75rem;
	min-width: 2.75rem;
	padding: 0;
	font-size: 1.25rem;
	line-height: 1;
}

.cd-button--icon svg {
	display: block;
	width: 1.25rem;
	height: 1.25rem;
}

/* --- Поля ввода и селекты ----------------------------------------------- */
.cd-input {
	width: 100%;
	min-width: 0;
	min-height: 2.75rem;
	padding: 0 0.75rem;
	border: 1px solid var(--ln);
	border-radius: 0.625rem;
	background: var(--bg);
	color: var(--tx);
	font: inherit;
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.9375rem;
}

.cd-input::placeholder { color: var(--mu); }

.cd-input:focus-visible {
	outline: 0.125rem solid var(--ac);
	outline-offset: 0.125rem;
}

.cd-field--inline {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	min-width: 0;
	font-size: 0.8125rem;
	color: var(--mu);
}

.cd-field--inline select,
.cd-other-coin select {
	min-height: 2.75rem;
	padding: 0 0.75rem;
	border: 1px solid var(--ln);
	border-radius: 0.625rem;
	background: var(--bg);
	color: var(--tx);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
}

.cd-field--inline select:focus-visible,
.cd-other-coin select:focus-visible {
	outline: 0.125rem solid var(--ac);
	outline-offset: 0.125rem;
}

.cd-other-coin {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	min-width: 0;
	font-size: 0.8125rem;
	color: var(--mu);
}

.cd-other-coin[hidden] { display: none; }

.cd-other-coin select { width: 100%; }

/* --- Бейдж-счётчик ------------------------------------------------------ */
.cd-badge {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.625rem;
	align-self: flex-start;
	max-width: 100%;
	padding: 0.5rem 0.875rem;
	background: var(--acs);
	border-radius: 0.625rem;
	color: var(--tx);
}

.cd-badge__num {
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.2;
	color: var(--lk);
}

.cd-badge__meta {
	min-width: 0;
	font-size: 0.8125rem;
	line-height: 1.3;
	color: var(--mu);
	overflow-wrap: anywhere;
}

/* --- Подпись обновления ------------------------------------------------- */
.cd-tool__updated {
	margin: 0;
	min-height: 1.25rem;
	font-size: 0.8125rem;
	line-height: 1.4;
	color: var(--mu);
}

/* --- Страница монеты: верхний блок -------------------------------------- */
.cd-tool[data-cd-coin] {
	align-items: stretch;
	gap: 1rem;
}

.cd-coin__top {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem 1rem;
}

.cd-coin__price-col {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
	min-width: 0;
	flex: 1 1 12rem;
}

.cd-coin__rank {
	font-size: 0.8125rem;
	line-height: 1.2;
	color: var(--mu);
}

.cd-coin__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.5rem;
	margin-left: auto;
	flex-shrink: 0;
}

/* --- Иконка-кнопка ------------------------------------------------------ */
.cd-iconbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 1px solid var(--ln);
	border-radius: 0.625rem;
	background: var(--bg);
	color: var(--mu);
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.cd-iconbtn svg {
	display: block;
	width: 1.25rem;
	height: 1.25rem;
}

.cd-iconbtn:hover {
	color: var(--lk);
	border-color: var(--ac);
}

.cd-iconbtn:focus-visible {
	outline: 0.125rem solid var(--ac);
	outline-offset: 0.125rem;
}

.cd-iconbtn[aria-pressed="true"],
.cd-iconbtn.is-on {
	color: var(--am);
	border-color: var(--am);
}

/* --- Переключатель валюты ----------------------------------------------- */
.cd-cur {
	display: inline-flex;
	gap: 0.125rem;
	padding: 0.1875rem;
	background: var(--sf2);
	border: 1px solid var(--ln);
	border-radius: 0.625rem;
}

.cd-cur[hidden] { display: none; }

.cd-cur button {
	min-width: 2.75rem;
	min-height: 2.375rem;
	padding: 0 0.625rem;
	border: 0;
	border-radius: 0.375rem;
	background: transparent;
	color: var(--mu);
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 700;
	cursor: pointer;
}

.cd-cur button:focus-visible {
	outline: 0.125rem solid var(--ac);
	outline-offset: 0.0625rem;
}

.cd-cur button[aria-checked="true"],
.cd-cur button.is-active {
	background: var(--bg);
	color: var(--tx);
}

/* --- Изменения курса ---------------------------------------------------- */
.cd-deltas {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 1rem;
	min-height: 1.25rem;
}

.cd-delta {
	display: inline-flex;
	align-items: baseline;
	gap: 0.25rem;
	white-space: nowrap;
}

.cd-delta__k {
	font-size: 0.75rem;
	color: var(--mu);
}

.cd-delta__v {
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.8125rem;
	font-weight: 600;
}

.cd-delta--up .cd-delta__v { color: var(--up); }
.cd-delta--dn .cd-delta__v { color: var(--dn); }

/* --- Подписи оси графика ------------------------------------------------ */
.cd-chart__axis {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.8125rem;
	color: var(--mu);
}

/* --- Блок «Купить и хранить» -------------------------------------------- */
.cd-buy {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.cd-buy > h2 {
	margin: 0;
	font-family: Manrope, system-ui, sans-serif;
	font-size: clamp(1.25rem, 2.6vw, 1.5rem);
	font-weight: 800;
	letter-spacing: -0.01em;
}

.cd-buy__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.75rem;
}

.cd-buy__card {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	min-height: 2.75rem;
	padding: 1rem 1.25rem;
	background: var(--sf);
	border: 1px solid var(--bd, var(--ln));
	border-radius: 0.875rem;
	color: inherit;
	text-decoration: none;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.cd-buy__card:hover {
	background: var(--sf2);
	border-color: var(--ac);
	text-decoration: none;
}

.cd-buy__card:focus-visible {
	outline: 0.125rem solid var(--ac);
	outline-offset: 0.125rem;
}

.cd-buy__title {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--tx);
}

.cd-buy__note {
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--mu);
}

@media (min-width: 48rem) {
	.cd-buy__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- Статьи по теме ----------------------------------------------------- */
.cd-related {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.cd-related > h2 {
	margin: 0;
	font-family: Manrope, system-ui, sans-serif;
	font-size: clamp(1.25rem, 2.6vw, 1.5rem);
	font-weight: 800;
	letter-spacing: -0.01em;
}

.cd-related__list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.5rem;
}

.cd-related__item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 2.75rem;
	padding: 0.625rem 0.75rem;
	background: var(--sf);
	border-radius: 0.625rem;
	color: inherit;
	text-decoration: none;
	transition: background 0.2s ease;
}

.cd-related__item:hover {
	background: var(--sf2);
	text-decoration: none;
}

.cd-related__item:hover .cd-related__t { color: var(--lk); }

.cd-related__item:focus-visible {
	outline: 0.125rem solid var(--ac);
	outline-offset: 0.125rem;
}

.cd-related__img {
	flex-shrink: 0;
	width: 4.5rem;
	height: 3rem;
	border-radius: 0.5rem;
	background: var(--sf2);
	object-fit: cover;
}

.cd-related__t {
	display: -webkit-box;
	min-width: 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--tx);
}

.cd-related__empty {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--mu);
}

@media (min-width: 64rem) {
	.cd-related__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- Лента непрочитанного ----------------------------------------------- */
.cd-unread__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
}

.cd-unread__headline {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	min-width: 0;
}

.cd-unread__headline h1 {
	margin: 0;
	font-family: Manrope, system-ui, sans-serif;
	font-size: clamp(1.625rem, 4vw, 2.375rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
}

.cd-unread__list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	min-width: 0;
}

.cd-unread__row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 2.75rem;
	padding: 0.625rem 0.75rem;
	background: var(--sf);
	border-radius: 0.625rem;
	color: inherit;
	text-decoration: none;
	transition: background 0.2s ease;
}

.cd-unread__row:hover {
	background: var(--sf2);
	text-decoration: none;
}

.cd-unread__row:hover .cd-unread__title { color: var(--lk); }

.cd-unread__row:focus-visible {
	outline: 0.125rem solid var(--ac);
	outline-offset: 0.125rem;
}

.cd-unread__img {
	flex-shrink: 0;
	width: 5rem;
	height: 3.25rem;
	border-radius: 0.5rem;
	background: var(--sf2);
	object-fit: cover;
}

.cd-unread__body {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	flex: 1 1 auto;
	min-width: 0;
}

.cd-unread__title {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--tx);
}

.cd-unread__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.375rem;
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.75rem;
	color: var(--mu);
}

.cd-unread__lang {
	padding: 0.0625rem 0.375rem;
	border-radius: 0.25rem;
	background: var(--sf2);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--mu);
}

@media (min-width: 48rem) {
	.cd-unread__head {
		flex-direction: row;
		align-items: flex-start;
		justify-content: space-between;
		gap: 1rem;
	}

	.cd-unread__headline { flex: 1 1 auto; }
}

/* --- Первый визит ------------------------------------------------------- */
.cd-first-note {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	padding: 1rem 1.25rem;
	background: var(--sf);
	border: 1px solid var(--bd, var(--ln));
	border-left: 0.1875rem solid var(--ac);
	border-radius: 0.625rem;
}

.cd-first-note[hidden] { display: none; }

.cd-first-note__title {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--tx);
}

.cd-first-note__text {
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--mu);
}

/* --- Калькулятор усреднения --------------------------------------------- */
.cd-position-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
	min-width: 0;
}

.cd-position-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	min-width: 0;
}

.cd-position-form__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 0.75rem;
}

.cd-position-form__head h2 {
	margin: 0;
	font-family: Manrope, system-ui, sans-serif;
	font-size: 1.0625rem;
	font-weight: 800;
	letter-spacing: -0.01em;
}

.cd-position-labels {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 2.75rem;
	gap: 0.5rem;
	font-size: 0.75rem;
	line-height: 1.2;
	color: var(--mu);
}

.cd-position-rows {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	min-width: 0;
}

.cd-position-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 2.75rem;
	gap: 0.5rem;
	align-items: center;
	min-width: 0;
}

.cd-position-add {
	justify-content: center;
	align-self: stretch;
}

.cd-position-result {
	display: flex;
	flex-direction: column;
	gap: 0.875rem;
	min-width: 0;
}

.cd-position-result .cd-tool__eyebrow { margin-bottom: 0; }

.cd-tool__big.cd-position-average {
	display: block;
	font-size: clamp(1.5rem, 4.5vw, 2rem);
	line-height: 1.15;
	overflow-wrap: anywhere;
}

.cd-stats--compact {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.5rem;
}

.cd-stats--compact .cd-stat strong {
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.cd-negative {
	color: var(--dn);
	font-weight: 600;
}

@media (min-width: 48rem) {
	.cd-position-add {
		align-self: flex-start;
		padding: 0 1.25rem;
	}
}

@media (min-width: 64rem) {
	.cd-position-grid {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
		gap: 1.125rem;
	}
}

@media (max-width: 30rem) {
	.cd-position-labels {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 2.5rem;
	}

	.cd-position-row {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 2.5rem;
	}
}

/* ===== Этап 5D: правки после скриншотов 24.09 (в конце файла — перекрывают батчи) ===== */
/* Топ-100 на телефоне: подписи и значения не наезжают друг на друга, ссылка монеты не вылезает за карточку. */
@media (max-width: 47.99rem) {
	.cd-table td { min-width: 0; }
	.cd-table td::before { flex-shrink: 0; white-space: nowrap; }
	.cd-table td > * { min-width: 0; }
	/* «.cd-table td» специфичнее «.cd-table__x» — поэтому здесь td.класс */
	.cd-table td.cd-table__num { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.cd-table td.cd-table__rank::before,
	.cd-table td.cd-table__coin::before { content: none; }
	.cd-table td.cd-table__spark { display: none; }
	.cd-table td.cd-table__rank { justify-content: flex-end; font-size: 0.75rem; color: var(--mu); }
	.cd-coin { min-width: 0; max-width: 100%; }
	.cd-coin__name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* Калькулятор: суммы итога в одну строку, на узком экране карточки итога в один столбец. */
.cd-position-result .cd-stat__value { white-space: nowrap; }
@media (max-width: 30rem) {
	.cd-position-result .cd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	/* Топ-100 на узком экране: капитализация и объём — во всю ширину карточки */
	.cd-table td.cd-table__num { grid-column: 1 / -1; }
}
/* Лента непрочитанного: кнопка в шапке не ломается на три строки */
.cd-unread__head .cd-button { white-space: nowrap; }

/* Витрина инструментов: живое значение может занять две строки, а не резаться многоточием */
.cd-tools-large__live {
	white-space: normal;
	overflow-wrap: anywhere;
	line-height: 1.25;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
/* Таблица халвингов: компактнее, чтобы на десктопе входила в карточку без прокрутки */
.cd-table-wrap table { font-size: 0.8125rem; }
.cd-table-wrap th, .cd-table-wrap td { padding-left: 0.5rem; padding-right: 0.5rem; }
.cd-table-wrap table { font-size: 0.75rem; }
.cd-table-wrap th, .cd-table-wrap td { white-space: normal; }
.cd-table-wrap table { width: 100%; table-layout: fixed; }
/* узкая первая колонка — только у таблиц с номером в строке (халвинги) */
.cd-table-wrap table:has(tbody th[scope=row]) th:first-child { width: 2.5rem; }
.cd-table-wrap .cd-table { min-width: 0; }

/* атрибут hidden сильнее display у блоков инструментов */
.cd-tool [hidden], .cd-chart-block[hidden], .cd-stats[hidden] { display: none !important; }

/* Простые таблицы (2–4 колонки): на телефоне остаются таблицей, без карточного режима топ-100 */
@media (max-width: 47.99rem) {
	.cd-table.cd-table--plain { display: table; width: 100%; min-width: 0; }
	.cd-table.cd-table--plain thead { display: table-header-group; }
	.cd-table.cd-table--plain tbody { display: table-row-group; }
	.cd-table.cd-table--plain tr, .cd-table.cd-table--plain .cd-table__row { display: table-row; padding: 0; margin: 0; background: none; }
	.cd-table.cd-table--plain th, .cd-table.cd-table--plain td { display: table-cell; padding: 0.5rem 0.375rem; border-bottom: 1px solid var(--ln); }
	.cd-table.cd-table--plain td::before { content: none; }
}
.cd-table.cd-table--plain { min-width: 0; table-layout: auto; }
.cd-table.cd-table--plain td:not(:first-child), .cd-table.cd-table--plain th:not(:first-child) { text-align: right; font-family: "IBM Plex Mono", ui-monospace, monospace; }

/* ==========================================================================
   Crypto Digest — страница «Топ-100» (page-top100): таблица на десктопе
   и компактный раскрывающийся список на телефоне.
   ========================================================================== */
@media (min-width: 48rem) {
	[data-cd-top100] .cd-table {
		table-layout: auto;
		min-width: 0;
		font-size: 0.8125rem;
	}
	[data-cd-top100] .cd-table th,
	[data-cd-top100] .cd-table td {
		white-space: nowrap;
	}
	[data-cd-top100] .cd-table td {
		padding: 0 0.375rem;
	}
	[data-cd-top100] .cd-table__sort {
		padding: 0 0.375rem;
	}
	[data-cd-top100] .cd-table th:first-child,
	[data-cd-top100] .cd-table td:first-child {
		width: 2.5rem;
	}
	[data-cd-top100] .cd-table th:first-child .cd-table__sort,
	[data-cd-top100] .cd-table td:first-child {
		padding-left: 0.625rem;
	}
	[data-cd-top100] .cd-table th:last-child .cd-table__sort,
	[data-cd-top100] .cd-table td.cd-table__spark {
		padding-right: 0.625rem;
	}
	[data-cd-top100] .cd-table__row {
		height: 3.25rem;
	}
	[data-cd-top100] .cd-coin {
		min-height: 0;
	}
	[data-cd-top100] .cd-coin__name {
		min-width: 0;
		max-width: 4.5rem;   /* с колонкой «1 ч» таблица впритык к 805px; полное имя — в title */
		white-space: nowrap;
	}
	[data-cd-top100] .cd-table__sort { font-size: 0.75rem; }
	[data-cd-top100] .cd-table__num {
		font-variant-numeric: tabular-nums;
	}
	[data-cd-top100] .cd-spark {
		width: 5.5rem;
		height: 1.75rem;
	}
}

.cd-top100-list {
	display: none;
	flex-direction: column;
	gap: 0.25rem;
}

@media (max-width: 47.99rem) {
	[data-cd-top100] .cd-table-wrap { display: none; }
	[data-cd-top100] .cd-toolbar {
		position: sticky;
		top: var(--cd-header-h, 64px);
		z-index: 10;
		padding: 0.25rem 0;
		background: var(--bg);
	}
	.cd-top100-list { display: flex; }
}

.cd-trow {
	background: var(--sf);
	border-radius: 0.625rem;
	overflow: hidden;
}

.cd-trow__main {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	width: 100%;
	min-height: 3.5rem;
	padding: 0.25rem 0.625rem;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.cd-trow__main:focus-visible {
	outline: 0.125rem solid var(--ac);
	outline-offset: -0.125rem;
}

.cd-trow__rank {
	flex: 0 0 auto;
	min-width: 0.875rem;
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.6875rem;
	color: var(--mu);
}

.cd-trow__ico {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 50%;
	background: var(--sf2);
	overflow: hidden;
	font-size: 0.6875rem;
	font-weight: 700;
}

.cd-trow__id {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-width: 0;
}

.cd-trow__sym {
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2;
}

.cd-trow__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.75rem;
	line-height: 1.2;
	color: var(--mu);
}

.cd-trow__nums {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	flex: 0 0 auto;
	margin-left: auto;
}

.cd-trow__price {
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.cd-trow__delta {
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.6875rem;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.cd-trow .cd-spark {
	flex: 0 0 auto;
	margin-left: 0;
	width: 3.75rem;
	height: 1.5rem;
}

.cd-trow__chev {
	flex: 0 0 auto;
	font-size: 1.125rem;
	line-height: 1;
	color: var(--mu);
	transition: transform 0.2s ease;
}

.cd-trow__main[aria-expanded="true"] .cd-trow__chev {
	transform: rotate(90deg);
}

.cd-trow__body {
	padding: 0 0.625rem 0.5rem;
}

.cd-trow__body[hidden] { display: none; }

.cd-trow__facts {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: 0.5rem 0;
	border-top: 1px solid var(--ln);
}

.cd-trow__fact {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	font-size: 0.8125rem;
	color: var(--mu);
}

.cd-trow__fact b {
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-weight: 600;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	color: var(--tx);
}

.cd-trow__fact b.cd-up { color: var(--up); }
.cd-trow__fact b.cd-dn { color: var(--dn); }

.cd-trow__link {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--lk);
	text-decoration: none;
}

.cd-trow__link:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
	.cd-trow__chev { transition: none; }
}

/* ===== Правки инструментов: халвинг, сессии, калькулятор, мобильные карточки ===== */
.cd-position-result .cd-stat strong,
.cd-position-result .cd-tool__big {
	white-space: nowrap;
}

.cd-position-result [data-copy-link] {
	white-space: nowrap;
}

@media (max-width: 30rem) {
	.cd-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cd-tool {
		padding: 1rem;
	}

	.cd-tool .cd-stat {
		background: transparent;
		padding: 0;
	}

	.cd-position-result [data-copy-link] {
		width: 100%;
	}
}

@media (max-width: 30rem) {
	[data-halving-card] .cd-table-wrap {
		overflow-x: visible;
		background: transparent;
		border-radius: 0;
	}

	[data-halving-card] .cd-table {
		display: block;
		min-width: 0;
	}

	[data-halving-card] .cd-table thead {
		display: none;
	}

	[data-halving-card] .cd-table tbody {
		display: block;
	}

	[data-halving-card] .cd-table tr {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.25rem 0.75rem;
		margin-bottom: 0.5rem;
		padding: 0.5rem 1rem 0.75rem;
		background: var(--sf);
		border-radius: 0.625rem;
	}

	[data-halving-card] .cd-table th,
	[data-halving-card] .cd-table td {
		display: flex;
		align-items: baseline;
		justify-content: space-between;
		gap: 0.5rem;
		padding: 0;
		border: 0;
		text-align: left;
		white-space: normal;
	}

	[data-halving-card] .cd-table th::before,
	[data-halving-card] .cd-table td::before {
		content: attr(data-label);
		font-family: Onest, system-ui, sans-serif;
		font-size: 0.75rem;
		color: var(--mu);
		white-space: nowrap;
	}

	[data-halving-card] .cd-table th[scope="row"] {
		grid-column: 1 / -1;
	}

	[data-halving-card] .cd-table th[scope="row"]::before {
		content: none;
	}
}

/* Ж-8 (консилиум 24.09): блок «Другие инструменты» в основной колонке дублировал виджет «Инструменты» сайдбара
   (на телефоне они шли подряд). Единый список — в сайдбаре (без текущей страницы). */
.cd-tools-block:not(.cd-side__block),
.cd-tools-more { display: none !important; }

/* Графики: общие стили */
.cd-chart {
  width: 100%;
  height: 220px;
  display: block;
  overflow: visible;
}

@media (max-width: 480px) {
  .cd-chart { height: 180px; }
}

.cd-chart-wrap {
  position: relative;
  width: 100%;
}

.cd-chart-wrap .cd-chart,
.cd-chart-wrap svg {
  width: 100%;
  height: 200px;
  display: block;
}

@media (max-width: 480px) {
  .cd-chart-wrap .cd-chart,
  .cd-chart-wrap svg { height: 170px; }
}

.cd-chart-block {
  margin: 1.25rem 0;
}

.cd-chart-block__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.cd-chart-block__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--tx);
}

.cd-chart-block__head .cd-chart-block__title,
.cd-chart-block__head .cd-h2 {
  margin-bottom: 0;
}

.cd-chart-caption {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--mu);
}

.cd-chart-note {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--mu);
}

/* SVG-элементы графика */
.cd-chart__area {
  opacity: 0.15;
}

.cd-chart__axis-label {
  fill: var(--mu);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.cd-chart__band {
  opacity: 0.12;
}

.cd-chart__band-label {
  fill: var(--mu);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.cd-chart__cross {
  stroke: var(--mu);
  stroke-dasharray: 4 4;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.cd-chart__dot,
.cd-chart__point {
  pointer-events: none;
}

.cd-chart__grid {
  stroke: var(--ln);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.cd-chart__last {
  pointer-events: none;
}

.cd-chart__line {
  stroke-width: 2;
  fill: none;
}

.cd-chart__minmax {
  fill: var(--tx);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-anchor: middle;
}

.cd-chart__ref {
  stroke: var(--ln);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
}

.cd-chart__ref-label {
  fill: var(--mu);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.cd-chart__summary {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--mu);
}

.cd-chart__tip-bg {
  fill: var(--tx);
  stroke: none;
  rx: 6;
  ry: 6;
}

.cd-chart__tip-text {
  fill: var(--bg);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.cd-chart__tooltip {
  pointer-events: none;
}

.cd-chart__xaxis {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.25rem;
  font-size: 11px;
  color: var(--mu);
  font-variant-numeric: tabular-nums;
}

.cd-chart__xaxis span {
  white-space: nowrap;
}

.cd-chart__xlabel {
  fill: var(--mu);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

/* Легенда зон */
.cd-fng-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0.75rem 0;
}

.cd-fng-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--mu);
}

.cd-fng-legend__item.is-current {
  font-weight: 600;
  color: var(--tx);
}

.cd-fng-legend__item.is-dn .cd-fng-legend__swatch {
  background: var(--dn);
}

.cd-fng-legend__item.is-am .cd-fng-legend__swatch {
  background: var(--am);
}

.cd-fng-legend__item.is-up .cd-fng-legend__swatch {
  background: var(--up);
}

.cd-fng-legend__swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex: none;
}

.cd-fng-legend__text {
  white-space: nowrap;
}

/* Сетка карточек «Вчера/Неделю назад/Месяц назад/Год назад» */
.cd-fng-past {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

@media (max-width: 480px) {
  .cd-fng-past {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Живое значение индекса */
.cd-fng-live {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.cd-fng-live__num {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cd-fng-zone {
  font-size: 0.9375rem;
  font-weight: 600;
}

.cd-fng-upd {
  font-size: 0.75rem;
  color: var(--mu);
}

/* Сегментированный переключатель периода */
.cd-seg {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  background: var(--sf2);
  border-radius: 6px;
  padding: 2px;
}

.cd-seg__btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.375rem 0.5rem;
  border: 0;
  background: transparent;
  color: var(--mu);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  border-radius: 4px;
  white-space: nowrap;
}

.cd-seg__btn[aria-selected="true"] {
  background: var(--sf);
  color: var(--tx);
  font-weight: 600;
  box-shadow: inset 0 -3px 0 var(--ac);
}

/* Сводка лонг/шорт */
.cd-ls-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75em;
  align-items: baseline;
}

.cd-ls-summary__item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15em;            /* в em: при кегле 56 px зазор 4 px склеивал «Лонги56,7%» (проверка 26.09) */
  font-weight: 600;
}

.cd-ls-summary__item--long {
  color: var(--up);
}

.cd-ls-summary__item--short {
  color: var(--dn);
}

.cd-ls-summary__label {
  margin-right: 0.3em;
  font-family: var(--ff-head);
  font-weight: 600;
  color: var(--mu);
  font-size: 0.6em;
  letter-spacing: 0;
}

/* ——— «Курс USDT»: подписи, таблицы, график, сетка карточек (В-8, Ж-2…Ж-5) ——— */
[data-p2p-uah] .cd-tool__big {
  min-width: 0;
  overflow-wrap: anywhere;
}

.cd-p2p-spread-note {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--mu);
}

.cd-p2p-spread-note[hidden] {
  display: none;
}

.cd-p2p-chart-note {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--mu);
}

.cd-p2p-chart-note[hidden] {
  display: none;
}

.cd-table th.cd-num,
.cd-table td.cd-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

[data-p2p-chart-section] .cd-chart-axis {
  display: none;
}

[data-p2p-chart-section] .cd-chart-wrap svg {
  display: block;
  width: 100%;
  height: 200px;
}

[data-p2p-uah] .cd-stats,
[data-p2p-eur] .cd-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
}

@media (max-width: 640px) {
  .cd-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-inline: 16px;
  }

  [data-p2p-chart-section] .cd-chart-wrap svg {
    height: 170px;
  }
}

/* ——— «Альтсезон»: пустое состояние без данных (В-2) ——— */
[data-cd-altseason].is-empty .cd-alt-head,
[data-cd-altseason].is-empty .cd-stats,
[data-cd-altseason].is-empty .cd-alt-leaders {
  display: none;
}

[data-cd-altseason].is-empty .cd-alt-bar__seg {
  background: var(--mu) !important;
  opacity: 0.18 !important;
}

[data-cd-altseason].is-empty .cd-alt-bar__mark {
  display: none !important;
}

[data-cd-altseason].is-empty .cd-state {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: var(--tx);
}

/* В-15: сегмент периодов графика — всегда в одну строку, кнопки сжимаются. */
.cd-chart-block__head .cd-seg {
  flex-wrap: nowrap;
  min-width: 0;
}

.cd-chart-block__head .cd-seg__btn {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
}

/* Ж-24: чипы изменений монеты — 4 в ряд, на телефоне 2×2. */
.cd-coin .cd-deltas {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.cd-coin .cd-delta {
  min-width: 0;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .cd-coin .cd-deltas {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Ж-24: показатели монеты — значения без переносов, ATH крупно. */
.cd-coin .cd-stat__value {
  white-space: nowrap;
}

.cd-coin .cd-stat--ath .cd-stat__line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cd-coin .cd-stat--ath .cd-stat__value {
  font-size: 1.25em;
  font-weight: 700;
}

.cd-coin .cd-stat--ath .cd-stat__sub {
  display: block;
  font-size: 0.8125rem;
  color: var(--mu);
}

.cd-coin .cd-stat--ath .cd-stat__diff {
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Ж-25: строка «обновлено HH:MM» под ценой в чипе полосы курсов. */
.cd-ticker__updated {
  display: block;
  font-size: 0.6875rem;
  color: var(--mu);
  white-space: nowrap;
}

/* В-13: карточки монет — два изменения рядом, без переносов. */
.cd-coins .cd-coin-card__row {
  flex-wrap: wrap;
}

.cd-coins .cd-coin-card__delta,
.cd-coins .cd-coin-card__delta7 {
  white-space: nowrap;
}

/* Ж-24: на странице монеты значения длинные («20,09 млн BTC», «$1,69 трлн») — карточки шире, чтобы не обрезались */
[data-cd-stats] { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }

/* Ж-30 (консилиум 24.09): закрытые торговые сессии приглушены, открытая — полным цветом */
[data-session-fill], [data-session-fill-2] { opacity: .45; transition: opacity .2s ease; }
[data-session-fill].is-active, [data-session-fill-2].is-active { opacity: 1; }

/* Топ-100: колонка «1 ч» — сужаем обивку ячеек и спарклайн, чтобы таблица влезала в 1280px */
[data-cd-top100] .cd-table td { padding-inline: 0.3rem; }
[data-cd-top100] .cd-table .cd-spark { width: 4.25rem; }   /* только в таблице: у мобильного списка свой размер */

/* Халвинг: вертикальные пунктирные отметки халвингов на графике цены BTC */
.cd-chart__vline { stroke: var(--mu); stroke-dasharray: 3 4; }
.cd-chart__vline-label { fill: var(--mu); }

/* Топ-100: длинные тикеры (FIGR_HELOC) обрезаются многоточием — иначе колонка «Монета» раздувает таблицу шире 805px */
[data-cd-top100] .cd-table .cd-coin__sym {
	display: inline-block;
	max-width: 4.5rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	vertical-align: bottom;
}

/* Топ-100 с колонкой «1 ч»: заголовки колонок с узкими полями — таблица должна влезать в 805px без прокрутки */
[data-cd-top100] .cd-table__sort { padding-inline: 0.25rem; }

/* Переключатель периода на узком телефоне: кнопки делили ширину поровну (flex 1 1 0, min-width 0) и «30 дней»
   обрезалось до «30 дне» (320 px, проверка 26.09.2026). Кнопка не уже своей надписи; не влезает — ряд переносится. */
.cd-seg { flex: 0 0 auto; max-width: 100%; }
.cd-seg button,
.cd-seg .cd-seg__btn,
.cd-chart-block__head .cd-seg__btn { flex: 1 0 auto; min-width: max-content; white-space: nowrap; }
/* Таблицы «Площадки» и «Источники» курса USDT на экранах уже 360 px уезжали в прокрутку (296 из 256 px). */
@media (max-width: 359px) {
  .cd-table-wrap .cd-table--plain th,
  .cd-table-wrap .cd-table--plain td { padding-left: .25rem; padding-right: .25rem; }
  .cd-table-wrap .cd-table--plain { font-size: .6875rem; }
  .cd-table-wrap .cd-table--plain th { white-space: normal; letter-spacing: 0; }
}

/* ===== Торговые сессии: выходные площадки ===== */
.cd-session-row.is-weekend [data-session-fill],
.cd-session-row.is-weekend [data-session-fill-2] { opacity: 0.35; }

/* ===== Торговые сессии: циферблат на 24 часа ===== */
.cd-session-dial {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	min-width: 0;
}

.cd-session-dial__clock {
	display: block;
	width: 100%;
	max-width: 20rem;
	height: auto;
	aspect-ratio: 1 / 1;
	margin: 0 auto;
}

.cd-session-dial__rim {
	fill: var(--sf);
	stroke: var(--ln);
	stroke-width: 1;
}

.cd-session-dial__tick {
	stroke: var(--ln);
	stroke-width: 1;
}

.cd-session-dial__tick--major {
	stroke: var(--mu);
	stroke-width: 1.5;
}

.cd-session-dial__hour {
	fill: var(--mu);
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 12px;
}

.cd-session-dial__track {
	fill: none;
	stroke: var(--sf2);
	stroke-width: 14;
}

.cd-session-dial__arc {
	fill: none;
	stroke-width: 14;
	stroke-linecap: butt;
	opacity: 0.45;
	transition: opacity 0.2s ease;
}

.cd-session-dial__arc--asia { stroke: var(--ac); }
.cd-session-dial__arc--europe { stroke: var(--up); }
.cd-session-dial__arc--usa { stroke: var(--am-fill); }

.cd-session-dial__arc.is-active { opacity: 1; }
.cd-session-dial__arc.is-weekend { opacity: 0.2; }

.cd-session-dial__overlap {
	fill: none;
	stroke: var(--tx);
	stroke-width: 6;
	stroke-linecap: butt;
	opacity: 0.55;
}

.cd-session-dial__center { fill: var(--bg); }

.cd-session-dial__hand {
	stroke: var(--dn);
	stroke-width: 2.5;
	stroke-linecap: round;
}

.cd-session-dial__hand-dot { fill: var(--dn); }

.cd-session-dial__time {
	fill: var(--tx);
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 22px;
	font-weight: 700;
}

.cd-session-dial__status {
	fill: var(--mu);
	font-family: Onest, system-ui, sans-serif;
	font-size: 11px;
}

.cd-session-dial__legend {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cd-session-dial__legend-item {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.5rem;
	min-width: 0;
	font-size: 0.8125rem;
}

.cd-session-dial__legend-dot {
	flex: 0 0 auto;
	align-self: center;
	width: 0.75rem;
	height: 0.75rem;
	border-radius: 50%;
	background: var(--ac);
}

.cd-session-dial__legend-dot--asia { background: var(--ac); }
.cd-session-dial__legend-dot--europe { background: var(--up); }
.cd-session-dial__legend-dot--usa { background: var(--am-fill); }

.cd-session-dial__legend-name {
	flex: 1 1 auto;
	min-width: 0;
	color: var(--tx);
}

.cd-session-dial__legend-item--overlap .cd-session-dial__legend-name,
.cd-session-dial__legend-item--next .cd-session-dial__legend-name {
	color: var(--mu);
}

.cd-session-dial__legend-hours {
	flex: 0 0 auto;
	font-family: "IBM Plex Mono", ui-monospace, monospace;
	font-size: 0.75rem;
	color: var(--mu);
	white-space: nowrap;
}

.cd-session-dial__legend-status {
	flex: 0 0 auto;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--mu);
	white-space: nowrap;
}

.cd-session-dial__legend-status.is-active { color: var(--up); }
.cd-session-dial__legend-status.is-weekend { color: var(--am); }

@media (min-width: 1024px) {
	.cd-session-dial {
		flex-direction: row;
		align-items: center;
		gap: 1.25rem;
	}

	.cd-session-dial__clock { flex: 0 0 auto; }

	.cd-session-dial__legend { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
	.cd-session-dial__arc { transition: none; }
}
