/* Каркас по утверждённому verstka/. Размеры и палитра — в tokens.css. */
@font-face {
	font-family: Inter;
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('../fonts/InterVariable.woff2') format('woff2');
}
* { box-sizing: border-box; }
html { background: var(--radio-bg); }
body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0;
	background-color: var(--radio-bg);
	background-attachment: fixed;
	color: var(--radio-text);
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	font-optical-sizing: none;
	line-height: 1.4;
	-webkit-font-smoothing: antialiased;
}
a { color: var(--radio-accent); }
button, input, select, textarea { font: inherit; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; }
.radio-container { width: 95%; max-width: 1100px; margin: 0 auto; }
.radio-layout {
	display: grid;
	grid-template-columns: var(--radio-sidebar-width) minmax(0, 1fr);
	flex: 1 0 auto;
}
.radio-page {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background-image: var(--radio-bg-gradient);
	background-attachment: fixed;
}
.radio-sidebar {
	position: sticky;
	top: 0;
	height: calc(100vh - var(--radio-player-panel-height));
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 18px 16px 24px;
	border: 1px solid var(--radio-border);
	background: var(--radio-panel);
	overflow-y: auto;
	z-index: 40;
}
.radio-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 10px;
	margin-bottom: 28px;
}
.radio-logo__image { flex: 0 0 var(--radio-logo-width); height: var(--radio-logo-height); }
.radio-logo__image .custom-logo-link { display: flex; align-items: center; justify-content: center; height: 100%; }
.radio-logo__image img {
	display: block;
	width: var(--radio-logo-width);
	height: var(--radio-logo-height);
	object-fit: contain;
}
.radio-logo__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1;
	font-size: 17px;
	letter-spacing: .02em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--radio-white);
	overflow-wrap: anywhere;
}
.radio-logo__text b { font-weight: 600; }
.radio-logo__text span { margin-top: 2px; color: var(--radio-accent-light); font-weight: 500; }
.radio-sidebar__menu, .radio-sidebar__menu .sub-menu {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.radio-sidebar__menu .sub-menu { padding-left: 14px; }
.radio-sidebar__menu a {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 11px 14px;
	border-radius: var(--radio-radius-sm);
	color: var(--radio-muted);
	font-size: 14px;
	text-decoration: none;
	transition: background .2s, color .2s;
}
.radio-sidebar__menu svg { flex-shrink: 0; width: 21px; height: 21px; }
.radio-sidebar__menu a:hover, .radio-sidebar__menu a:focus-visible {
	color: var(--radio-text);
	background: var(--radio-hover);
}
.radio-sidebar__menu a[aria-current="page"], .radio-sidebar__menu a[aria-current="location"] {
	color: var(--radio-text);
	background: var(--radio-nav-active);
	box-shadow: var(--radio-nav-shadow);
}
.radio-sidebar__menu a[aria-current] svg { color: var(--radio-accent-light); }
.radio-sidebar__promo {
	position: relative;
	margin-top: auto;
	padding: 16px 14px 14px;
	border-radius: var(--radio-radius);
	border: 1px solid var(--radio-border);
	background: var(--radio-promo-gradient);
	overflow: hidden;
}
.radio-widget { min-width: 0; }
.radio-widget .wp-block-image { margin: 0; }
.radio-widget img { display: block; max-width: 100%; height: auto; }
.radio-widget__title { margin: 0 0 8px; font-size: 18px; }
.radio-widget .wp-block-group-is-layout-flex { display: flex; flex-wrap: wrap; gap: 14px; }
.radio-header__inner {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 22px 0;
	margin-bottom: 22px;
}
/* До переноса Hero сохраняем заголовок главной и слоган для средств чтения. */
.radio-header__tagline {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	border: 0;
	clip-path: inset(50%);
	overflow: hidden;
	white-space: nowrap;
	font-weight: 400;
}
.radio-nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.radio-nav::-webkit-scrollbar { display: none; }
.radio-nav__menu {
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.radio-nav__menu li { flex-shrink: 0; }
.radio-nav__menu a {
	display: block;
	padding: 8px 12px;
	border-radius: var(--radio-radius-sm);
	font-size: 13px;
	color: var(--radio-muted);
	white-space: nowrap;
	text-decoration: none;
	transition: color .2s, background .2s;
}
.radio-nav__menu a:hover { color: var(--radio-text); background: var(--radio-hover); }
.radio-nav__menu a:focus-visible { outline: 2px solid var(--radio-accent); outline-offset: -2px; }
.radio-header__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; min-height: 38px; }
.radio-header__auth {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 34px;
	padding: 0 12px;
	border-radius: var(--radio-radius-sm);
	border: 1px solid var(--radio-line-strong);
	font-size: 12px;
	color: var(--radio-muted);
	text-decoration: none;
}
.radio-header__auth::before {
	content: '';
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	background: currentColor;
	mask: url('../images/user.svg') center / contain no-repeat;
}
.radio-header__auth:has(.radio-header__auth-avatar)::before { display: none; }
.radio-header__auth:hover { color: var(--radio-text); border-color: var(--radio-accent); }
.radio-header__auth-avatar { display: block; width: 16px; height: 16px; border-radius: 50%; object-fit: cover; }
.radio-menu-toggle {
	display: none;
	width: 38px;
	height: 38px;
	flex-shrink: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	place-items: center;
	color: var(--radio-muted);
	background: none;
	cursor: pointer;
}
.radio-menu-toggle svg { width: 20px; height: 20px; }
.radio-menu-toggle:hover { color: var(--radio-text); background: var(--radio-hover); }
.radio-menu-scrim { display: none; }
body.radio-menu-open { overflow: hidden; }
.radio-main { min-width: 0; flex: 1 0 auto; padding: 0 22px 28px; }
.radio-main__content { min-width: 0; }
.radio-entry__title { margin: 0 0 12px; font-size: 28px; }
.radio-entry__content img { max-width: 100%; height: auto; }

/* Повторяем оформление карточек и кнопок кабинета в общих компонентах темы. */
.radio-surface { padding:22px; border:1px solid var(--radio-border); border-radius:var(--radio-radius); background:var(--radio-cabinet-panel); }
.radio-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:9px 14px; border:1px solid var(--radio-accent); border-radius:8px; background:var(--radio-accent); color:var(--radio-white); font:inherit; font-size:13px; text-decoration:none; cursor:pointer; }
.radio-button--secondary { background:transparent; border-color:var(--radio-line-strong); color:var(--radio-muted); }
.radio-button:hover { color:var(--radio-white); background:var(--radio-brand-2); }
.radio-button:focus-visible { outline:2px solid var(--radio-accent); outline-offset:3px; }
.radio-button:disabled { opacity:.5; cursor:default; }
.radio-prose { width:100%; max-width:75ch; margin:0 auto; font-size:16px; overflow-wrap:anywhere; }
.radio-prose .radio-entry__title { margin-bottom:22px; }
.radio-prose :where(p,ul,ol,blockquote,figure,table,pre,.wp-block-group,.wp-block-columns) { margin:0 0 16px; }
.radio-prose :where(h2,h3,h4,h5,h6) { margin:24px 0 12px; font-weight:600; line-height:1.4; }
.radio-prose h2 { font-size:22px; }
.radio-prose h3 { font-size:18px; }
.radio-prose :where(h4,h5,h6) { font-size:16px; }
.radio-prose :where(ul,ol) { padding-left:24px; }
.radio-prose li { margin-bottom:8px; }
.radio-prose li > :where(ul,ol) { margin:8px 0 0; }
.radio-prose a { color:var(--radio-accent-light); text-underline-offset:4px; }
.radio-prose a:hover { color:var(--radio-text); }
.radio-prose a:focus-visible { outline:2px solid var(--radio-accent); outline-offset:3px; }
.radio-prose blockquote { padding:12px 16px; border-left:4px solid var(--radio-accent); border-radius:var(--radio-radius-sm); background:var(--radio-hover); color:var(--radio-muted); }
.radio-prose blockquote > :last-child { margin-bottom:0; }
.radio-prose cite,.radio-prose figcaption { color:var(--radio-text-subtle); font-size:13px; }
.radio-prose .wp-block-table { max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; }
.radio-prose table { width:100%; border-collapse:collapse; font-size:14px; overflow-wrap:normal; }
.radio-prose :where(th,td) { padding:12px; border:1px solid var(--radio-line-strong); text-align:left; vertical-align:top; }
.radio-prose th { background:var(--radio-hover); font-weight:600; }
.radio-prose img { display:block; max-width:100%; height:auto; border-radius:var(--radio-radius-sm); }
.radio-prose figcaption { margin-top:8px; }
.radio-prose :where(.aligncenter,.alignwide,.alignfull) { margin-left:auto; margin-right:auto; max-width:100%; }
.radio-prose pre { padding:16px; overflow-x:auto; border:1px solid var(--radio-border); border-radius:var(--radio-radius-sm); background:var(--radio-panel-2); }
.radio-prose hr { margin:24px 0; border:0; border-top:1px solid var(--radio-line-strong); }
.radio-prose .wp-block-columns { display:flex; gap:16px; }
.radio-prose .wp-block-column { flex:1; min-width:0; }
.radio-prose .radio-entry__content { display:flow-root; }
.radio-prose .alignleft { float:left; margin:0 16px 16px 0; max-width:100%; }
.radio-prose .alignright { float:right; margin:0 0 16px 16px; max-width:100%; }
.radio-prose .wp-block-buttons { display:flex; flex-wrap:wrap; gap:8px; }
.radio-prose .wp-block-button__link { display:inline-flex; padding:9px 14px; border:1px solid var(--radio-accent); border-radius:8px; background:var(--radio-accent); color:var(--radio-white); font-size:13px; text-decoration:none; }
.radio-discovery { display:grid; gap:22px; max-width:1100px; margin:0 auto; }
.radio-discovery > .radio-entry__title { margin:0; overflow-wrap:anywhere; }
.radio-discovery__intro > :first-child { margin-top:0; }
.radio-discovery__intro p { margin:0 0 16px; color:var(--radio-muted); }
.radio-discovery__intro h2,.radio-search-results > h2 { margin:0 0 16px; font-size:19px; }
.radio-search-form { display:grid; gap:8px; }
.radio-search-form > label { color:var(--radio-muted); }
.radio-search-form__fields { display:flex; gap:8px; }
.radio-search-form input { flex:1; width:100%; min-width:0; height:40px; padding:0 12px; border:1px solid var(--radio-line-strong); border-radius:8px; background:var(--radio-panel-2); color:var(--radio-text); font:inherit; }
.radio-search-form input:focus-visible { outline:2px solid var(--radio-accent); outline-offset:3px; }
.radio-search-results { min-width:0; }
.radio-search-results__item { margin-bottom:12px; }
.radio-search-results__item h3 { margin:0 0 8px; font-size:18px; overflow-wrap:anywhere; }
.radio-search-results__item a { color:var(--radio-accent-light); text-decoration:none; }
.radio-search-results__item a:hover { color:var(--radio-text); text-decoration:underline; }
.radio-search-results__item p { max-width:75ch; margin:0; color:var(--radio-muted); overflow-wrap:anywhere; }
.radio-search-results .nav-links { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:16px; }
.radio-search-results .page-numbers { padding:9px 14px; border:1px solid var(--radio-line-strong); border-radius:8px; color:var(--radio-muted); }
.radio-search-results .page-numbers.current { color:var(--radio-white); background:var(--radio-accent); border-color:var(--radio-accent); }
@media(max-width:640px) {
 .radio-surface { padding:16px; }
 .radio-prose .wp-block-columns { flex-direction:column; }
 .radio-prose :where(.alignleft,.alignright) { float:none; margin:0 auto 16px; }
}

/* Главная: обычные группы и шорткоды редактора WordPress. */
.radio-home {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--radio-side-column);
	gap: 20px;
	align-items: start;
}
.radio-home__main, .radio-home__side, .radio-home__side > .wp-block-group { min-width: 0; }
.radio-home__main { container-type: inline-size; }
.radio-home__side { display: flex; flex-direction: column; gap: 14px; }
/* Классические темы получают дополнительную обёртку групп от WordPress. */
.radio-home > .wp-block-group__inner-container,
.radio-home__side > .wp-block-group__inner-container { display: contents; }
.radio-home__side .radio-chart { margin-top: 0; }

@media (max-width: 1100px) {
	.radio-home { grid-template-columns: minmax(0, 1fr); }
	.radio-home__side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
	.radio-home__side { grid-template-columns: minmax(0, 1fr); }
}
.radio-footer__partners {
	padding: 28px 22px;
	background: var(--radio-panel);
	text-align: center;
}
.radio-footer__partners-title { margin: 0; font-size: 20px; }
.radio-footer__partners-description { margin: 6px 0 22px; font-size: 12px; color: var(--radio-text-subtle); }
.radio-footer__logos, .radio-footer__apps {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 16px 28px;
}
.radio-footer__logos > .radio-widget, .radio-footer__apps > .radio-widget,
.radio-footer__logos .wp-block-image, .radio-footer__apps .wp-block-image {
	min-width: 0;
	max-width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}
.radio-footer__logos .radio-widget__title, .radio-footer__apps .radio-widget__title,
.radio-footer__logos figcaption, .radio-footer__apps figcaption { display: none; }
.radio-footer__logos img { width: auto; height: var(--radio-partner-logo-height); object-fit: contain; }
.radio-footer__apps { flex: 0 1 auto; gap: 12px; }
.radio-footer__apps img { width: auto; height: var(--radio-app-badge-height); object-fit: contain; }
.radio-footer__logos a, .radio-footer__apps a { display: inline-flex; border: 0; background: transparent; transition: filter .2s; }
.radio-footer__logos a:hover, .radio-footer__apps a:hover { filter: brightness(1.15); }
.radio-footer__logos a:focus-visible, .radio-footer__apps a:focus-visible { outline: 2px solid var(--radio-accent); outline-offset: 4px; }
.radio-footer {
	flex-shrink: 0;
	padding: 20px 22px;
	background: var(--radio-panel);
	border-top: 1px solid var(--radio-border);
	color: var(--radio-text-subtle);
	font-size: 12px;
}
.radio-footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
.radio-footer__info { display: flex; flex: 1 1 480px; flex-wrap: wrap; align-items: center; gap: 10px 24px; min-width: 0; }
.radio-footer__copy { margin: 0; font-size: inherit; }
.radio-footer__documents, .radio-footer__menu { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.radio-footer__menu { margin: 0; padding: 0; list-style: none; }
.radio-footer__documents a { color: var(--radio-text-subtle); text-decoration: none; transition: color .2s; }
.radio-footer__documents a:hover { color: var(--radio-muted); }
@media (max-width: 900px) {
	.radio-layout { grid-template-columns: minmax(0, 1fr); }
	.radio-sidebar {
		position: fixed;
		left: 0;
		top: 0;
		bottom: var(--radio-player-panel-height);
		height: auto;
		width: var(--radio-sidebar-mobile-width);
		transform: translateX(-100%);
		transition: transform .3s ease;
	}
	body.radio-menu-open .radio-sidebar, .radio-sidebar--fallback { transform: none; }
	.radio-sidebar--fallback { position: static; width: 100%; }
	body.radio-menu-open .radio-menu-scrim {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 30;
		border: 0;
		background: var(--radio-scrim);
		cursor: pointer;
	}
	.radio-menu-toggle:not([hidden]) { display: grid; }
	.radio-header__inner { padding: 12px 16px 0; gap: 10px; }
	.radio-main { padding: 0 16px 24px; }
	.radio-footer { padding: 18px 16px; }
}
@media (max-width: 640px) {
	.radio-header__inner { gap: 8px; flex-wrap: wrap; }
	.radio-nav { order: 3; flex: 0 0 calc(100% + 32px); width: calc(100% + 32px); margin: 0 -16px; padding: 0 12px; }
	.radio-header__auth { padding: 0 10px; }
	.radio-footer__partners { padding: 24px 16px; }
	.radio-footer__logos { gap: 14px 22px; }
	.radio-footer__bottom, .radio-footer__info { flex-direction: column; align-items: center; text-align: center; }
	.radio-footer__info { flex: 0 1 auto; }
	.radio-footer__documents, .radio-footer__menu { justify-content: center; }
	.radio-footer__apps { margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) {
	.radio-sidebar { transition: none; }
}
.radio-star {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linejoin: round;
}

.is-active .radio-star,
[aria-pressed="true"] .radio-star {
	fill: var(--radio-favorite);
	stroke: var(--radio-favorite);
}

.radio-to-top {
	position: fixed;
	right: var(--radio-space);
	bottom: calc(var(--radio-player-panel-height) + var(--radio-space));
	z-index: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: var(--radio-panel);
	border: 1px solid var(--radio-border);
	border-radius: 50%;
	color: var(--radio-text);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0.2s;
}

/* Положение — только класс-модификатор, без инлайн-стилей (AGENTS.md §7). */
.radio-to-top--left {
	right: auto;
	left: var(--radio-space);
}

.radio-to-top:hover,
.radio-to-top:focus-visible {
	border-color: var(--radio-accent);
	color: var(--radio-accent);
}

.radio-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Пока открыт попап истории, кнопка «Наверх» не перекрывает его. */
body.radio-history-open .radio-to-top {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	.radio-to-top {
		transition: none;
	}
}

/* Обычные блоки промо: заголовок, текст, разделитель и необязательная плашка. */
.radio-sidebar__promo .radio-widget + .radio-widget { margin-top:12px; }
.radio-sidebar__promo :is(h2,h3,h4) { margin:0 0 8px; color:var(--radio-text); font-size:15px; line-height:1.3; }
.radio-sidebar__promo p { margin:0 0 10px; color:var(--radio-muted); font-size:12.5px; line-height:1.5; }
.radio-sidebar__promo a { color:var(--radio-accent-light); text-underline-offset:3px; }
.radio-sidebar__promo .wp-block-separator { width:100%; height:1px; margin:12px 0; border:0; background:var(--radio-border); }
.radio-sidebar__promo .is-style-radio-badge { display:inline-block; padding:3px 9px; border:1px solid var(--radio-border); border-radius:var(--radio-radius); color:var(--radio-accent-light); font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.radio-footer__socials { display:flex; flex:1 1 auto; justify-content:center; }
.radio-footer__socials .radio-widget { margin:0; padding:0; border:0; background:none; }
.radio-footer__socials .wp-block-social-links { display:flex; justify-content:center; flex-wrap:wrap; gap:10px; margin:0; padding:0; list-style:none; }
.radio-footer__socials .wp-social-link { margin:0; padding:0; background:none; }
.radio-footer__socials .wp-block-social-link-anchor { display:grid; place-items:center; width:44px; height:44px; border:1px solid var(--radio-border); border-radius:12px; color:var(--radio-muted); background:var(--radio-panel); text-decoration:none; transition:color .2s,border-color .2s; }
.radio-footer__socials .wp-block-social-link-anchor:hover { color:var(--radio-accent-light); border-color:var(--radio-accent); }
.radio-footer__socials .wp-block-social-link-anchor:focus-visible { outline:2px solid var(--radio-accent); outline-offset:3px; }
.radio-footer__socials svg { display:block; width:22px; height:22px; fill:currentColor; }
.radio-footer__socials .screen-reader-text { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media(max-width:640px) { .radio-footer__socials { flex:0 1 auto; margin-top:6px; } }
