/*
Theme Name: WomenMag Theme
Theme URI: https://womenmag.ru
Author: Your Name
Author URI: https://example.com
Description: Чистая, быстрая и SEO/AI-дружественная тема для блога. Светлая дружелюбная шапка, зелёные акценты, минималистичная типографика, поддержка IndexNow, Open Graph, JSON-LD и llms.txt для ИИ-краулеров. Тема шапки и акцентный цвет переключаются в Настройщике. Разработана с нуля, вдохновлена композицией темы Vegeta.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: womenmag-theme
Tags: blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, seo-friendly
*/

/* -------------------------------------------------------------
   1. Переменные и сброс
------------------------------------------------------------- */
:root {
	--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-serif: Georgia, "Times New Roman", Times, serif;

	--color-bg: #ffffff;
	--color-bg-alt: #f4f5f6;
	--color-surface-subtle: #f2f8f4;
	--color-text: #1a1a1a;
	--color-text-muted: #666666;
	--color-border: #e6e6e6;

	--color-accent: #2e9e5c;
	--color-accent-dark: #227a47;
	--color-accent-contrast: #ffffff;

	--color-header-bg: #ffffff;
	--color-header-text: #1a1a1a;
	--color-header-text-muted: #5c5c5c;
	--color-header-border: #e6e6e6;

	--radius: 10px;
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
	--shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);

	--max-width: 1180px;
	--transition: 180ms ease;
}

/* Опциональная тёмная шапка (включается в Настройщике: Aurora → Оформление → Тема шапки) */
.site-header.is-dark-header {
	--color-header-bg: #14141a;
	--color-header-text: #f2f2f2;
	--color-header-text-muted: #b3b3b8;
	--color-header-border: #14141a;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 17px;
	line-height: 1.65;
	color: var(--color-text);
	background: var(--color-bg-alt);
	transition: background var(--transition), color var(--transition);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-accent); text-decoration: none; }
a:hover, a:focus { color: var(--color-accent-dark); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-serif);
	line-height: 1.25;
	margin: 0 0 0.6em;
	font-weight: 700;
	color: var(--color-text);
}

p { margin: 0 0 1.2em; }

ul, ol { padding-left: 1.3em; }

button, input, textarea, select { font-family: inherit; font-size: 1rem; }

/* Доступность: skip-link */
.skip-link {
	position: absolute;
	top: -40px;
	left: 0;
	background: var(--color-accent);
	color: #fff;
	padding: 10px 18px;
	z-index: 10000;
	transition: top var(--transition);
}
.skip-link:focus { top: 0; text-decoration: none; }

.screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px;
	word-wrap: normal !important;
}

/* -------------------------------------------------------------
   2. Контейнеры / сетка
------------------------------------------------------------- */
.site { display: flex; flex-direction: column; min-height: 100vh; }

.container {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 20px;
}

.content-wrapper {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 40px;
	max-width: var(--max-width);
	margin: 24px auto 36px;
	padding: 0 20px;
	align-items: start;
}

.content-wrapper.no-sidebar { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.content-wrapper.no-sidebar-archive { grid-template-columns: minmax(0, 1fr); max-width: var(--max-width); }

@media (max-width: 860px) {
	.content-wrapper { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------
   3. Шапка
------------------------------------------------------------- */
.site-header {
	background: var(--color-header-bg);
	color: var(--color-header-text);
	border-bottom: 1px solid var(--color-header-border);
	box-shadow: var(--shadow-sm);
	position: sticky;
	top: 0;
	z-index: 200;
	transition: background var(--transition), border-color var(--transition), transform 220ms ease;
}

/* На десктопе при прокрутке вниз шапка уезжает вверх, освобождая место —
   "Рубрики" в этот момент доступны через плавающую иконку меню (см. ниже). */
@media (min-width: 641px) {
	.site-header.is-hidden { transform: translateY(-100%); }
}

@media (max-width: 640px) {
	.aurora-fab--menu { display: none !important; }
}

/* Если вы залогинены в WordPress, вверху страницы есть системная чёрная
   панель администратора — её не видят обычные посетители сайта. Чтобы липкая
   шапка темы не наезжала на неё, сдвигаем шапку на её высоту. */
body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
	body.admin-bar .site-header { top: 46px; }
}

.site-header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 72px;
}

.site-branding { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 auto; }

.site-title {
	font-family: var(--font-serif);
	font-weight: 700;
	font-size: clamp(1.05rem, 1.6vw + 0.7rem, 1.5rem);
	margin: 0;
	letter-spacing: 0.01em;
	min-width: 0;
	flex: 1 1 auto;
}
.site-title a {
	display: block;
	color: var(--color-header-text);
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.site-title a:hover,
.site-title a:focus { color: var(--color-accent); text-decoration: none; }

.site-description {
	display: none;
}

.custom-logo-link img { max-height: 40px; width: auto; }

/* Кнопка открытия меню — всегда видна в шапке, само меню живёт в выдвижной панели.
   Так шапка остаётся компактной, даже если пунктов меню очень много. */
.menu-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	border: 1px solid var(--color-header-border);
	color: var(--color-header-text);
	border-radius: 999px;
	padding: 8px 16px;
	font-size: 0.88rem;
	letter-spacing: 0.02em;
	cursor: pointer;
	flex-shrink: 0;
	transition: border-color var(--transition), color var(--transition);
}
.menu-toggle:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* Выдвижная панель меню */
.nav-drawer {
	position: fixed;
	inset: 0;
	z-index: 500;
	visibility: hidden;
}
.nav-drawer.is-open { visibility: visible; }

.nav-drawer__overlay {
	position: absolute;
	inset: 0;
	background: rgba(20, 20, 26, 0.4);
	opacity: 0;
	transition: opacity var(--transition);
}
.nav-drawer.is-open .nav-drawer__overlay { opacity: 1; }

.nav-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	width: 340px;
	max-width: 88vw;
	background: var(--color-bg);
	box-shadow: var(--shadow-md);
	padding: 24px 22px 40px;
	overflow-y: auto;
	transform: translateX(100%);
	transition: transform 280ms ease;
}
.nav-drawer.is-open .nav-drawer__panel { transform: translateX(0); }

.nav-drawer__close {
	background: transparent;
	border: 1px solid var(--color-border);
	color: var(--color-text);
	border-radius: 50%;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	margin-bottom: 18px;
}
.nav-drawer__close:hover { border-color: var(--color-accent); color: var(--color-accent); }

.nav-drawer__filter {
	display: block;
	width: 100%;
	padding: 10px 14px;
	margin-bottom: 16px;
	border: 1px solid var(--color-border);
	border-radius: 999px;
	background: var(--color-surface-subtle);
	color: var(--color-text);
	font-size: 0.92rem;
}
.nav-drawer__filter:focus { outline: none; border-color: var(--color-accent); }

.nav-drawer__list,
.nav-drawer__list ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.nav-drawer__list > li { border-bottom: 1px solid var(--color-border); }
.nav-drawer__list li { position: relative; }
.nav-drawer__list li.is-filtered-out { display: none; }

.nav-drawer__list a {
	display: block;
	padding: 11px 30px 11px 2px;
	color: var(--color-text);
	font-size: 0.97rem;
	line-height: 1.3;
}
.nav-drawer__list a:hover { color: var(--color-accent); text-decoration: none; }

.nav-drawer__list .sub-menu {
	max-height: 0;
	overflow: hidden;
	transition: max-height 260ms ease;
}
.nav-drawer__list .menu-item-has-children.is-expanded > .sub-menu {
	max-height: 1600px;
	background: var(--color-surface-subtle);
	border-radius: 8px;
	margin: 2px 0 8px;
	padding: 4px 0 4px 12px;
}
.nav-drawer__list .sub-menu a { font-size: 0.9rem; color: var(--color-text-muted); padding: 8px 30px 8px 10px; }
.nav-drawer__list .sub-menu li { border-bottom: none; }

.submenu-toggle {
	position: absolute;
	right: 0;
	top: 2px;
	width: 32px;
	height: 32px;
	background: transparent;
	border: none;
	color: var(--color-text-muted);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform var(--transition);
}
.menu-item-has-children.is-expanded > .submenu-toggle { transform: rotate(180deg); color: var(--color-accent); }

.nav-drawer__empty { color: var(--color-text-muted); font-size: 0.92rem; }

body.nav-drawer-open { overflow: hidden; }

/* -------------------------------------------------------------
   3.5 Заголовки архивов и страницы автора
------------------------------------------------------------- */
.page-header {
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 24px 28px;
	margin-bottom: 26px;
}
.page-header .page-title { font-size: 1.5rem; margin: 0 0 8px; }
.archive-description {
	color: var(--color-text-muted);
	font-size: 0.98rem;
	margin: 0;
}

.author-header {
	display: flex;
	align-items: center;
	gap: 20px;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 24px 28px;
	margin-bottom: 26px;
}
.author-header img { border-radius: 50%; flex-shrink: 0; }
.author-header__name { font-size: 1.4rem; margin: 0 0 6px; }
.author-header__bio { margin: 0; color: var(--color-text-muted); }

@media (max-width: 480px) {
	.author-header { flex-direction: column; align-items: flex-start; text-align: left; gap: 14px; }
}

/* -------------------------------------------------------------
   4. Карточки записей
------------------------------------------------------------- */
.post-card {
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
	margin-bottom: 28px;
	transition: box-shadow var(--transition), transform var(--transition);
}
.post-card:hover { box-shadow: var(--shadow-md); }

.post-card .post-thumbnail img { width: 100%; aspect-ratio: 16/9; object-fit: cover; object-position: top; }

/* Горизонтальный вид карточки: картинка слева, текст справа (Настройщик → Aurora → Контент и вывод) */
.post-card--horizontal {
	display: flex;
	flex-direction: row;
	align-items: stretch;
}
.post-card--horizontal .post-thumbnail {
	flex: 0 0 260px;
	max-width: 40%;
}
.post-card--horizontal .post-thumbnail img {
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	object-fit: cover;
	object-position: top;
}
.post-card--horizontal .post-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
}
@media (max-width: 640px) {
	.post-card--horizontal { flex-direction: column; }
	.post-card--horizontal .post-thumbnail { flex: none; max-width: none; }
}

/* Сеточный вид: несколько колонок карточек (Настройщик → Aurora → Контент и вывод) */
body.aurora-grid-cards #primary {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 24px;
	align-items: start;
}
/* .no-sidebar обычно сужает колонку до 760px (удобно для чтения статьи без
   сайдбара), но для сетки карточек это не нужно — наоборот, освободившееся
   место должно просто вместить ещё один столбец карточек того же размера. */
body.aurora-grid-cards .content-wrapper.no-sidebar {
	max-width: var(--max-width);
}
body.aurora-grid-cards #primary > .page-header,
body.aurora-grid-cards #primary > .author-header,
body.aurora-grid-cards #primary > .pagination,
body.aurora-grid-cards #primary > .no-results,
body.aurora-grid-cards #primary > article.aurora-single-entry,
body.aurora-grid-cards #primary > .comments-area {
	grid-column: 1 / -1;
}
body.aurora-grid-cards .post-card {
	margin-bottom: 0;
	height: 100%;
	display: flex;
	flex-direction: column;
}
/* Дополнительный вариант формы картинок в сетке — квадратные, не заменяет обычный вид выше */
body.aurora-grid-cards.aurora-grid-square .post-card .post-thumbnail img {
	aspect-ratio: 1 / 1;
}
/* Третий вариант: ширина 100%, высота — 85% от квадрата */
body.aurora-grid-cards.aurora-grid-wide85 .post-card .post-thumbnail img {
	aspect-ratio: 1 / 0.85;
}
body.aurora-grid-cards .post-card__body { padding: 16px 18px 20px; }
body.aurora-grid-cards .post-card .entry-title {
	font-size: 1.1rem;
	line-height: 1.35;
	margin-bottom: 0.5em;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}
body.aurora-grid-cards .post-card .entry-summary {
	font-size: 0.86rem;
	line-height: 1.5;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}
@media (max-width: 640px) {
	body.aurora-grid-cards #primary { grid-template-columns: 1fr; }
}

.post-card__body { padding: 22px 24px 26px; }

.post-card .entry-title { font-size: 1.5rem; margin-bottom: 0.4em; }
.post-card .entry-title a { color: var(--color-text); }
.post-card .entry-title a:hover { color: var(--color-accent); text-decoration: none; }

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	align-items: center;
	font-size: 0.86rem;
	color: var(--color-text-muted);
	margin: 10px 0 0;
}
.entry-meta a { color: var(--color-text-muted); }
.entry-meta a:hover { color: var(--color-accent); }

.author-avatar { border-radius: 50%; width: 28px; height: 28px; }

.entry-summary { color: var(--color-text-muted); }

.read-more {
	display: inline-block;
	margin-top: 6px;
	font-weight: 600;
	font-size: 0.92rem;
}

/* -------------------------------------------------------------
   5. Одиночный пост / страница
------------------------------------------------------------- */
.aurora-single-entry {
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
	padding: 34px 38px 40px;
}

@media (max-width: 600px) {
	.aurora-single-entry { padding: 22px 20px 28px; }
}

.single .entry-header,
.page .entry-header { margin-bottom: 20px; }

.single .entry-title,
.page .entry-title { font-size: 2.1rem; }

.entry-breadcrumbs { display: block; margin-bottom: 10px; font-size: 0.88rem; color: var(--color-text-muted); }
.entry-breadcrumbs a { color: var(--color-accent); }

.aurora-single-entry .post-thumbnail {
	margin: 24px -38px 28px;
}
.aurora-single-entry .post-thumbnail img {
	width: 100%;
	max-height: 480px;
	object-fit: cover;
	object-position: top;
	border-radius: 0;
}
@media (max-width: 600px) {
	.aurora-single-entry .post-thumbnail { margin: 18px -20px 22px; }
}

/* Вариант «Растянуть по ширине целиком, без обрезания» — вся картинка видна,
   без кадрирования по высоте (высота подстраивается под пропорции картинки). */
.aurora-single-entry .post-thumbnail--stretch-fit img {
	max-height: none;
	height: auto;
	object-fit: initial;
}

/* Вариант «По центру, без растягивания» — своя ширина (в % от текста),
   картинка не бежит через всю ширину экрана. */
.aurora-single-entry .post-thumbnail--centered {
	margin: 24px 0 28px;
	text-align: center;
}
.aurora-single-entry .post-thumbnail--centered img {
	display: inline-block;
	width: var(--aurora-img-width, 100%);
	max-width: 100%;
	height: auto;
	max-height: none;
	object-fit: initial;
	border-radius: var(--radius);
}
@media (max-width: 600px) {
	.aurora-single-entry .post-thumbnail--centered { margin: 18px 0 22px; }
}

/* Содержание статьи (TOC) — нативный <details>, сворачивается без JS */
.toc-box {
	background: var(--color-surface-subtle);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 18px 24px;
	margin: 0 0 28px;
}
.toc-box__title {
	margin: 0;
	font-family: var(--font-sans);
	font-weight: 700;
	font-size: 0.95rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--color-text);
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.toc-box__title::-webkit-details-marker { display: none; }
.toc-box__title::after {
	content: '';
	width: 10px;
	height: 10px;
	flex-shrink: 0;
	border-right: 2px solid var(--color-accent);
	border-bottom: 2px solid var(--color-accent);
	transform: rotate(45deg);
	transition: transform var(--transition);
	margin-left: 12px;
}
.toc-box[open] .toc-box__title::after { transform: rotate(-135deg); }
.toc-box[open] .toc-box__title { margin-bottom: 12px; }

.toc-box__list {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: toc-counter;
	font-size: 0.88rem;
}
.toc-box__list li {
	counter-increment: toc-counter;
	padding: 3px 0;
	line-height: 1.4;
	break-inside: avoid;
}
.toc-box__list li::before {
	content: counter(toc-counter) ".";
	color: var(--color-accent);
	font-weight: 700;
	margin-right: 6px;
}
.toc-box__list a { color: var(--color-text); }
.toc-box__list a:hover { color: var(--color-accent); text-decoration: none; }

@media (min-width: 640px) {
	.toc-box__list {
		columns: 2;
		column-gap: 28px;
	}
}
/* В плавающей панели (маленькая ширина) — всегда одна колонка */
.toc-fab-panel .toc-box__list { columns: 1; font-size: 0.86rem; }

.entry-content { font-size: 1.08rem; }
.entry-content h2 {
	font-size: 1.5rem;
	margin-top: 1.5em;
	padding-top: 0.6em;
	border-top: 1px solid var(--color-border);
	scroll-margin-top: 90px;
}
.entry-content h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.entry-content h3 { font-size: 1.25rem; margin-top: 1.2em; scroll-margin-top: 90px; }
.entry-content p:first-of-type {
	font-size: 1.15rem;
	color: var(--color-text);
}
.entry-content blockquote {
	margin: 1.4em 0;
	padding: 0.6em 1.2em;
	border-left: 4px solid var(--color-accent);
	background: var(--color-surface-subtle);
	font-style: italic;
	color: var(--color-text-muted);
}
.entry-content pre {
	background: #1e1e22;
	color: #eee;
	padding: 16px;
	border-radius: 8px;
	overflow-x: auto;
}
.entry-content img { border-radius: var(--radius); }

/* Вставленное видео (YouTube, RuTube, VK Видео и т.п.) не должно растягивать
   контент — прижимаем к ширине текста и держим пропорцию 16:9, даже если
   хостинг-провайдер прописал в коде другие фиксированные пиксели. */
.entry-content iframe,
.entry-content object,
.entry-content embed {
	max-width: 100%;
}
.entry-content iframe {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
	border-radius: var(--radius);
}
.entry-content figcaption { font-size: 0.85rem; color: var(--color-text-muted); text-align: center; margin-top: 6px; }

/* Автор и дата под статьёй: автор слева (с карточкой по наведению/тапу), дата справа */
.entry-byline {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-top: 32px;
	padding-top: 20px;
	border-top: 1px solid var(--color-border);
	font-size: 0.9rem;
	color: var(--color-text-muted);
}
.entry-byline time { flex-shrink: 0; }

/* Триггер: аватар + имя автора */
.entry-byline__author-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}
.author-card-trigger {
	color: var(--color-text);
	font-weight: 600;
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	cursor: pointer;
}
.author-card-trigger:hover,
.entry-byline__author-wrap.is-open .author-card-trigger {
	color: var(--color-accent);
	text-decoration: none;
}

/* Сама карточка — popover над именем */
.author-card {
	position: absolute;
	left: 0;
	bottom: calc(100% + 12px);
	width: 270px;
	max-width: 80vw;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
	padding: 16px;
	z-index: 90;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
	text-align: left;
}
/* Наведение — только на устройствах, где оно реально есть (не залипает на тачскрине) */
@media (hover: hover) {
	.entry-byline__author-wrap:hover .author-card,
	.entry-byline__author-wrap:focus-within .author-card {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}
}
/* Тап на мобильном/без hover — через класс, который переключает JS */
.entry-byline__author-wrap.is-open .author-card {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.author-card__header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}
.author-card__header img { border-radius: 50%; flex-shrink: 0; }
.author-card__name {
	font-weight: 700;
	font-size: 1rem;
	color: var(--color-text);
}
.author-card__bio {
	display: block;
	font-size: 0.87rem;
	line-height: 1.5;
	color: var(--color-text-muted);
	margin-bottom: 12px;
}
.author-card__posts-title {
	display: none;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--color-text-muted);
	margin-bottom: 6px;
}
.author-card__posts {
	display: none;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--color-border);
}
.author-card__posts a {
	font-size: 0.85rem;
	color: var(--color-text);
	line-height: 1.35;
}
.author-card__posts a:hover { color: var(--color-accent); }
/* "Последние статьи" — только на десктопе, чтобы карточка не разрасталась на телефоне */
@media (min-width: 769px) {
	.author-card__posts-title,
	.author-card__posts { display: flex; }
}
.author-card__all-link {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--color-accent);
}
.author-card__all-link:hover { text-decoration: underline; }

@media (max-width: 480px) {
	.entry-byline { align-items: flex-start; }
	.author-card { left: auto; right: 0; }
}

.author-box {
	display: flex;
	gap: 16px;
	background: var(--color-surface-subtle);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 20px;
	margin: 28px 0 0;
}
.author-box img { border-radius: 50%; flex-shrink: 0; }
.author-box h3 { margin: 0 0 6px; font-size: 1.05rem; }

/* -------------------------------------------------------------
   6. Сайдбар / виджеты
------------------------------------------------------------- */

/* Свёрнутый сайдбар: контент занимает всю ширину (обе колонки), сам сайдбар
   скрыт, пока не нажата кнопка-таб — тогда он возвращается обычным сайдбаром
   в его normal месте, без всплывающих панелей. */
.content-wrapper.sidebar-collapsed { grid-template-columns: minmax(0, 1fr); }
.content-wrapper.sidebar-collapsed .widget-area { display: none; }
.content-wrapper.sidebar-collapsed.is-sidebar-open { grid-template-columns: minmax(0, 1fr) 320px; }
.content-wrapper.sidebar-collapsed.is-sidebar-open .widget-area { display: block; }
@media (max-width: 860px) {
	.content-wrapper.sidebar-collapsed.is-sidebar-open { grid-template-columns: 1fr; }
}

/* Кнопка-таб для возврата свёрнутого сайдбара — прикреплена к правому краю
   экрана, в стиле остальных элементов сайта. */
.sidebar-edge-toggle {
	position: fixed;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	z-index: 140;
	width: 32px;
	height: 58px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-right: none;
	border-radius: 10px 0 0 10px;
	box-shadow: var(--shadow-md);
	color: var(--color-text-muted);
	cursor: pointer;
	transition: color var(--transition), border-color var(--transition);
}
.sidebar-edge-toggle:hover { color: var(--color-accent); border-color: var(--color-accent); }
.sidebar-edge-toggle svg { transition: transform var(--transition); }
.content-wrapper.is-sidebar-open .sidebar-edge-toggle svg { transform: rotate(180deg); }

.widget-area { min-width: 0; }

.widget-area .widget {
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 22px;
	margin-bottom: 24px;
}
.widget-area .widget-title {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--color-text-muted);
	margin-bottom: 14px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--color-accent);
}
.widget-area ul { list-style: none; padding: 0; margin: 0; }
.widget-area li { padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.widget-area li:last-child { border-bottom: 0; }
.widget-area li a { color: var(--color-text); }
.widget-area li a:hover { color: var(--color-accent); text-decoration: none; }

/* Виджет "Рубрики" — счётчик записей в виде бейджа */
.widget_categories li,
.widget_archive li,
.widget_pages li,
.widget_meta li,
.widget_recent_comments li,
.widget_nav_menu li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}
.widget_categories .count {
	font-size: 0.75rem;
	color: var(--color-text-muted);
	background: var(--color-surface-subtle);
	border-radius: 999px;
	padding: 1px 9px;
}

/* Виджет "Облако меток" — стиль пилюль как в тегах статьи */
.widget_tag_cloud .tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.widget_tag_cloud .tagcloud a {
	font-size: 0.85rem !important;
	border: 1px solid var(--color-border);
	border-radius: 999px;
	padding: 4px 12px;
	color: var(--color-text-muted) !important;
}
.widget_tag_cloud .tagcloud a:hover { border-color: var(--color-accent); color: var(--color-accent) !important; text-decoration: none; }

/* Виджет "Последние обновления" (с миниатюрой) */
.aurora-recent-posts { list-style: none; margin: 0; padding: 0; }
.widget-area .aurora-recent-posts li.aurora-recent-posts__item {
	padding: 0;
	border-bottom: 1px solid var(--color-border);
}
.aurora-recent-posts__item:last-child { border-bottom: 0; }

.aurora-recent-posts__link {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 4px;
	border-radius: 8px;
	color: inherit;
	transition: background var(--transition);
}
.aurora-recent-posts__link:hover,
.aurora-recent-posts__link:focus {
	background: var(--color-surface-subtle);
	text-decoration: none;
}

.aurora-recent-posts__thumb {
	flex-shrink: 0;
	width: 60px;
	height: 60px;
	border-radius: 8px;
	overflow: hidden;
	display: block;
}
.aurora-recent-posts__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
	transition: transform var(--transition);
}
.aurora-recent-posts__link:hover .aurora-recent-posts__thumb img { transform: scale(1.06); }

.aurora-recent-posts__body { flex: 1; min-width: 0; }

.aurora-recent-posts__title {
	display: block;
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.35;
	color: var(--color-text);
	margin-bottom: 4px;
	transition: color var(--transition);
	/* аккуратное обрезание длинных заголовков в 2 строки */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.aurora-recent-posts__link:hover .aurora-recent-posts__title { color: var(--color-accent); }

.aurora-recent-posts__date {
	display: block;
	font-size: 0.78rem;
	color: var(--color-text-muted);
}

.search-form { display: flex; gap: 8px; }
.search-form__input {
	flex: 1;
	padding: 10px 14px;
	border: 1px solid var(--color-border);
	border-radius: 999px;
	background: var(--color-surface-subtle);
	color: var(--color-text);
}
.search-form__submit {
	border: none;
	background: var(--color-accent);
	color: #fff;
	width: 40px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.search-form__submit svg { width: 16px; height: 16px; fill: currentColor; }

.social-links { display: flex; flex-wrap: wrap; gap: 8px; }
.social-links a {
	width: 38px; height: 38px;
	border: 1px solid var(--color-border);
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	color: var(--color-text);
}
.social-links a:hover { border-color: var(--color-accent); color: var(--color-accent); text-decoration:none; }
.social-links svg { width: 17px; height: 17px; fill: currentColor; }

/* -------------------------------------------------------------
   7. Пагинация / формы / комментарии
------------------------------------------------------------- */
.pagination {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin: 10px 0 30px;
}
.pagination a, .pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border-radius: 8px;
	border: 1px solid var(--color-border);
	color: var(--color-text);
}
.pagination .current { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.pagination a:hover { border-color: var(--color-accent); text-decoration: none; }

.comments-area {
	margin-top: 36px;
	padding-top: 28px;
	border-top: 1px solid var(--color-border);
}

.comments-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--color-surface-subtle);
	border: 1px solid var(--color-border);
	color: var(--color-text);
	font-weight: 600;
	font-size: 0.95rem;
	padding: 12px 20px;
	border-radius: 999px;
	cursor: pointer;
	transition: border-color var(--transition), color var(--transition);
}
.comments-toggle:hover { border-color: var(--color-accent); color: var(--color-accent); }
.comments-toggle::after {
	content: '';
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform var(--transition);
}
.comments-toggle.is-open::after { transform: rotate(-135deg); }

.comments-panel { margin-top: 22px; }

.comments-title { font-size: 1.35rem; margin-bottom: 20px; }

.comment-list { list-style: none; padding: 0; margin: 0 0 30px; }
.comment-list ol.children { list-style: none; padding-left: 32px; margin-top: 16px; }

.comment-list .comment-body {
	background: var(--color-surface-subtle);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 18px 20px;
	margin-bottom: 16px;
}

.comment-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.comment-author.vcard { display: flex; align-items: center; gap: 10px; }
.comment-author .avatar { border-radius: 50%; width: 40px; height: 40px; display: block; }
.comment-author .fn { font-style: normal; font-weight: 700; font-size: 0.95rem; color: var(--color-text); }
.comment-author .says { display: none; }
.comment-metadata { font-size: 0.8rem; }
.comment-metadata a { color: var(--color-text-muted); }
.comment-metadata a:hover { color: var(--color-accent); }
.comment-metadata .edit-link { margin-left: 8px; }

.comment-content { font-size: 0.98rem; line-height: 1.6; }
.comment-content p:last-child { margin-bottom: 0; }

.comment-list .reply { margin-top: 10px; }
.comment-reply-link {
	display: inline-block;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--color-accent);
	border: 1px solid var(--color-accent);
	border-radius: 999px;
	padding: 4px 14px;
}
.comment-reply-link:hover { background: var(--color-accent); color: #fff; text-decoration: none; }

.comment-respond {
	background: var(--color-surface-subtle);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 24px 26px;
}
.comment-reply-title { margin-top: 0; font-size: 1.15rem; }
.comment-notes, .comment-form-comment label, .comment-form-author label, .comment-form-email label, .comment-form-url label {
	font-size: 0.86rem;
	color: var(--color-text-muted);
	display: block;
	margin-bottom: 6px;
}
.comment-form-comment, .comment-form-author, .comment-form-email, .comment-form-url { margin-bottom: 14px; }

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--color-border);
	border-radius: 8px;
	background: var(--color-bg);
	color: var(--color-text);
	transition: border-color var(--transition), box-shadow var(--transition);
}
.comment-respond input[type="text"]:focus,
.comment-respond input[type="email"]:focus,
.comment-respond input[type="url"]:focus,
.comment-respond textarea:focus {
	outline: none;
	border-color: var(--color-accent);
	box-shadow: 0 0 0 3px rgba(46, 158, 92, 0.15);
}
.comment-respond textarea { min-height: 130px; resize: vertical; }

.comment-form-cookies-consent { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 16px; }
.comment-form-cookies-consent input { width: auto; }

.comment-respond .form-submit { margin: 0; }
.comment-respond .form-submit input {
	background: var(--color-accent);
	color: #fff;
	border: none;
	padding: 12px 26px;
	border-radius: 999px;
	font-weight: 600;
	cursor: pointer;
	transition: background var(--transition);
}
.comment-respond .form-submit input:hover { background: var(--color-accent-dark); }

/* -------------------------------------------------------------
   8. Подвал
------------------------------------------------------------- */
.site-footer {
	background: var(--color-header-bg);
	color: var(--color-header-text-muted);
	border-top: 1px solid var(--color-header-border);
	margin-top: auto;
	padding: 30px 0;
	font-size: 0.9rem;
}
.site-footer .container {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}
.site-footer a { color: var(--color-header-text); }

/* -------------------------------------------------------------
   9. Утилиты
------------------------------------------------------------- */
.alignwide { max-width: 100%; }
.aligncenter { margin-left: auto; margin-right: auto; }
.has-text-align-center { text-align: center; }
.no-results { padding: 30px; background: var(--color-bg); border-radius: var(--radius); border: 1px solid var(--color-border); }

/* -------------------------------------------------------------
   10. Похожие статьи (виджет и шорткод [aurora_related])
------------------------------------------------------------- */
.aurora-related { margin-top: 32px; }
.aurora-related__title {
	font-weight: 700;
	font-size: 0.95rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--color-text);
	margin: 0 0 14px;
}
.aurora-related__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}
.widget-area .aurora-related__grid { grid-template-columns: 1fr; }

.aurora-related__item {
	display: block;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
	color: var(--color-text);
	background: var(--color-bg);
	transition: box-shadow var(--transition);
}
.aurora-related__item:hover { box-shadow: var(--shadow-sm); text-decoration: none; }
.aurora-related__thumb { display: block; aspect-ratio: 16/10; overflow: hidden; }
.aurora-related__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.aurora-related__caption {
	display: block;
	padding: 10px 12px;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.35;
}
.aurora-related__item:hover .aurora-related__caption { color: var(--color-accent); }

@media (max-width: 480px) {
	.aurora-related__grid { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------
   11. Бесконечная лента
------------------------------------------------------------- */
.infinite-post {
	margin-top: 28px;
	padding-top: 28px;
	border-top: 2px solid var(--color-border);
}
.infinite-post .entry-title { font-size: 1.7rem; }
.infinite-continue {
	margin-top: 20px;
	font-weight: 600;
}
.infinite-loading {
	text-align: center;
	padding: 24px 0;
	color: var(--color-text-muted);
	font-size: 0.92rem;
}

/* -------------------------------------------------------------
   12. Плавающие кнопки: оглавление на ходу + к комментариям
------------------------------------------------------------- */
.aurora-fabs {
	position: fixed;
	right: 18px;
	bottom: 20px;
	z-index: 150;
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: flex-end;
}

.aurora-fab {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	box-shadow: var(--shadow-md);
	color: var(--color-text);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	opacity: 0;
	transform: translateY(8px) scale(0.9);
	pointer-events: none;
	transition: opacity 200ms ease, transform 200ms ease, border-color 200ms ease, color 200ms ease;
}
.aurora-fab.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.aurora-fab:hover,
.aurora-fab.is-active { border-color: var(--color-accent); color: var(--color-accent); }

.aurora-fab { position: relative; }
.aurora-fab__badge {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--color-accent);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

.toc-fab-panel {
	position: fixed;
	right: 18px;
	bottom: 74px;
	z-index: 151;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
	padding: 16px 18px;
	max-width: 280px;
	max-height: 320px;
	overflow-y: auto;
}
.toc-fab-panel .toc-box__list { margin: 0; }

@media (max-width: 600px) {
	.aurora-fabs { right: 10px; bottom: 14px; gap: 8px; }
	.aurora-fab { width: 40px; height: 40px; }
	.aurora-fab.is-visible { opacity: 0.78; }
	.aurora-fab.is-visible:hover,
	.aurora-fab.is-visible:active { opacity: 1; }
	.toc-fab-panel { right: 10px; left: 10px; max-width: none; }

	/* Кнопка "наверх" — только для десктопа, на мобильном и так недалеко крутить назад */
	.aurora-fab--top { display: none !important; }
}

/* -------------------------------------------------------------
   13. Мобильные экраны: сплошной белый фон вместо карточек на сером
   (на маленьком экране серые поля и рамки только отнимают и без того
   тесное место) + компактнее заголовок статьи.
------------------------------------------------------------- */
@media (max-width: 640px) {
	body { background: var(--color-bg); }

	.content-wrapper {
		padding: 0;
		margin: 0;
		gap: 0;
	}

	/* Карточки записей в ленте: без рамки/тени, разделены тонкой линией */
	.post-card {
		border: none;
		border-left: none;
		border-right: none;
		border-radius: 0;
		border-bottom: 1px solid var(--color-border);
		margin-bottom: 0;
	}
	.post-card:hover { box-shadow: none; }
	.post-card:last-child { border-bottom: none; }
	.post-card__body { padding: 18px 20px 22px; }
	.post-card .entry-title { font-size: 1.3rem; }

	/* Статья/страница: без рамки и тени, короткие боковые поля вместо "карточки" */
	.aurora-single-entry {
		border: none;
		border-radius: 0;
		box-shadow: none;
		padding: 20px 18px 28px;
	}
	.aurora-single-entry .post-thumbnail { margin: 16px -18px 20px; }
	.aurora-single-entry .post-thumbnail--centered { margin: 16px 0 20px; }

	/* Заголовок статьи — заметно компактнее, чтобы не занимать весь экран */
	.single .entry-title,
	.page .entry-title { font-size: 1.5rem; }

	/* Заголовки рубрик/меток и страница автора — тоже без рамки-карточки */
	.page-header,
	.author-header {
		border: none;
		border-radius: 0;
		border-bottom: 1px solid var(--color-border);
		padding: 18px;
	}

	/* Виджеты сайдбара — без рамки, разделены линией, во всю ширину */
	.widget-area { padding: 0 18px; }
	.widget-area .widget {
		border: none;
		border-radius: 0;
		border-bottom: 1px solid var(--color-border);
		padding: 18px 0;
		margin-bottom: 0;
	}

	.no-results { border: none; border-radius: 0; padding: 20px 18px; }
}

/* -------------------------------------------------------------
   14. Быстрые ссылки рядом с «Рубрики» (Внешний вид → Меню → «Быстрые ссылки»)
------------------------------------------------------------- */
.header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

.quicklink { position: relative; }

.quicklink__trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	border: 1px solid var(--color-header-border);
	color: var(--color-header-text);
	border-radius: 999px;
	padding: 8px 16px;
	font-size: 0.88rem;
	letter-spacing: 0.02em;
	white-space: nowrap;
	transition: border-color var(--transition), color var(--transition);
}
.quicklink__trigger:hover,
.quicklink:focus-within .quicklink__trigger {
	border-color: var(--color-accent);
	color: var(--color-accent);
	text-decoration: none;
}
.quicklink__trigger svg { flex-shrink: 0; }

/* Выпадающий список последних записей (при наведении, только на устройствах с мышью) */
.quicklink__dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	padding-top: 10px;
	width: 340px;
	max-width: 90vw;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
	z-index: 210;
}
.quicklink__list {
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
	padding: 8px;
}
@media (hover: hover) {
	.quicklink:hover .quicklink__dropdown,
	.quicklink:focus-within .quicklink__dropdown {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}
}

.quicklink__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px;
	border-radius: 8px;
	color: var(--color-text);
	transition: background var(--transition);
}
.quicklink__item:hover { background: var(--color-surface-subtle); text-decoration: none; }
.quicklink__thumb {
	flex-shrink: 0;
	width: 56px;
	height: 56px;
	border-radius: 8px;
	overflow: hidden;
	background: var(--color-surface-subtle);
}
.quicklink__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.quicklink__title {
	flex: 1;
	min-width: 0;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.35;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.quicklink__item:hover .quicklink__title { color: var(--color-accent); }

/* Мобильные: в шапке "пилюль" нет — вместо них иконки в плавающем кластере (создаёт main.js) */
@media (max-width: 640px) {
	.quicklink { display: none; }
}
@media (min-width: 641px) {
	.aurora-fab--quicklink,
	.quicklink-fab-panel { display: none !important; }
}

.quicklink-fab-panel {
	position: fixed;
	right: 68px;
	bottom: 20px;
	z-index: 152;
	width: min(320px, calc(100vw - 88px));
	max-height: 70vh;
	overflow-y: auto;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
	padding: 8px;
}
.quicklink-fab-panel__head {
	display: block;
	padding: 8px 8px 10px;
	font-weight: 700;
	font-size: 0.92rem;
	color: var(--color-accent);
	border-bottom: 1px solid var(--color-border);
	margin-bottom: 6px;
}

/* -------------------------------------------------------------
   15. Подписи к картинкам (шорткод [caption]) и картинка вверху статьи на мобильных
------------------------------------------------------------- */
/* WordPress прописывает у <figure class="wp-caption"> фиксированную ширину
   в пикселях прямо в атрибуте style — на узком экране она растягивала страницу. */
.entry-content .wp-caption,
.entry-content figure[style*="width"] {
	max-width: 100% !important;
	width: auto !important;
	box-sizing: border-box;
}
.entry-content .wp-caption img {
	display: block;
	max-width: 100%;
	height: auto;
	margin-left: auto;
	margin-right: auto;
}
.entry-content .wp-caption-text,
.entry-content figcaption {
	font-size: 0.85rem;
	line-height: 1.4;
	color: var(--color-text-muted);
	text-align: center;
	margin-top: 6px;
}

/* На мобильных картинка вверху статьи — всегда на всю ширину экрана (независимо
   от настройки) и не выше самого экрана, чтобы целиком попадать в видимую зону. */
@media (max-width: 640px) {
	.aurora-single-entry .post-thumbnail,
	.aurora-single-entry .post-thumbnail--stretch-fit,
	.aurora-single-entry .post-thumbnail--centered {
		margin: 16px -18px 20px;
		text-align: center;
	}
	.aurora-single-entry .post-thumbnail img,
	.aurora-single-entry .post-thumbnail--stretch-fit img,
	.aurora-single-entry .post-thumbnail--centered img {
		display: block;
		width: 100%;
		max-width: 100%;
		height: auto;
		max-height: 100vh;
		max-height: 100svh;
		object-fit: contain;
		border-radius: 0;
	}
}


/* -------------------------------------------------------------
   16. Картинка вместо названия сайта; плавающие кнопки на мобильных
------------------------------------------------------------- */
.site-logo-link { display: flex; align-items: center; min-width: 0; }
.site-logo-link:hover { text-decoration: none; }
.site-logo {
	display: block;
	height: var(--aurora-logo-h, 40px);
	width: auto;
	max-width: 100%;
	object-fit: contain;
}
.site-logo-link .site-logo--mobile { display: none; }

.aurora-fabs__items {
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: flex-end;
}
.aurora-fabs__toggle { display: none; }

@media (max-width: 640px) {
	.site-logo-link.has-mobile .site-logo--desktop { display: none; }
	.site-logo-link.has-mobile .site-logo--mobile { display: block; }

	/* Кнопки — не сбоку столбиком, а снизу в ряд, чуть мельче */
	.aurora-fabs {
		left: auto;
		right: 0;
		bottom: 8px;
		flex-direction: row;
		align-items: center;
		gap: 0;
		padding-right: 4px;
	}
	.aurora-fabs__items {
		flex-direction: row;
		align-items: center;
		gap: 8px;
		transition: transform 220ms ease, opacity 220ms ease;
	}
	.aurora-fab { width: 34px; height: 34px; }
	.aurora-fab svg { width: 17px; height: 17px; }
	.aurora-fab:not(.is-visible) { display: none; }

	/* Минималистичная стрелка: без фона и кружка, сворачивает кнопки вбок */
	.aurora-fabs__toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		background: none;
		border: 0;
		box-shadow: none;
		padding: 6px 4px;
		color: var(--color-text-muted);
		cursor: pointer;
	}
	.aurora-fabs__toggle svg { transition: transform 220ms ease; }
	.aurora-fabs.is-collapsed .aurora-fabs__items {
		transform: translateX(130%);
		opacity: 0;
		pointer-events: none;
	}
	.aurora-fabs.is-collapsed .aurora-fabs__toggle svg { transform: rotate(180deg); }
	/* Если показывать нечего — стрелка тоже не нужна */
	.aurora-fabs:not(:has(.aurora-fab.is-visible:not(.aurora-fab--top):not(.aurora-fab--menu))) .aurora-fabs__toggle { display: none; }

	.toc-fab-panel { bottom: 52px; left: 10px; right: 10px; }
	.quicklink-fab-panel { left: 10px; right: 10px; bottom: 52px; width: auto; }
}


/* -------------------------------------------------------------
   17. Превью ссылок в тексте (при наведении, только на устройствах с мышью)
------------------------------------------------------------- */
.aurora-link-preview {
	position: fixed;
	left: 0;
	top: 0;
	z-index: 400;
	width: 300px;
	max-width: calc(100vw - 16px);
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity 150ms ease, transform 150ms ease, visibility 150ms;
	pointer-events: none;
}
.aurora-link-preview.is-visible { opacity: 1; visibility: visible; transform: none; }
.aurora-link-preview__img {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 8px;
	object-fit: cover;
	background: var(--color-surface-subtle);
}
.aurora-link-preview__body { flex: 1; min-width: 0; }
.aurora-link-preview__title { display: block; font-weight: 700; font-size: 0.88rem; line-height: 1.3; color: var(--color-text); }
.aurora-link-preview__desc { display: block; font-size: 0.8rem; line-height: 1.4; color: var(--color-text-muted); margin-top: 3px; }
.aurora-link-preview__host { display: block; font-size: 0.72rem; color: var(--color-accent); margin-top: 4px; }
@media (max-width: 640px) {
	.aurora-link-preview { display: none; }
}
