/*
Theme Name: Сказочник №13
Theme URI: https://1-3.name/
Author: 1-3.name
Description: Лёгкая самостоятельная тема для библиотеки «Сказочник №13».
Version: 1.0.7
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: skazochnik-13
*/

:root {
	--page-bg: #f7fafc;
	--surface: #ffffff;
	--surface-soft: #edf6fc;
	--surface-warm: #fff8df;
	--text: #26384a;
	--text-soft: #627487;
	--heading: #173b63;
	--accent: #287bb7;
	--accent-dark: #175f94;
	--accent-soft: #d8ecf9;
	--warm: #e3ad36;
	--border: #dce8f1;
	--shadow: 0 12px 34px rgba(26, 69, 105, 0.08);
	--radius: 18px;
	--reading-width: 800px;
	--site-width: 1180px;
}

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

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

body {
	margin: 0;
	background: var(--page-bg);
	color: var(--text);
	font-family: Tahoma, Geneva, Verdana, Arial, sans-serif;
	font-size: 17px;
	line-height: 1.65;
}

button,
input,
select,
textarea {
	font: inherit;
}

a {
	color: var(--accent-dark);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.16em;
}

a:hover {
	color: #0f4b78;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
	outline: 3px solid rgba(227, 173, 54, 0.6);
	outline-offset: 3px;
}

img,
svg,
video,
iframe {
	max-width: 100%;
}

img {
	height: auto;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	top: 0.75rem;
	left: 0.75rem;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	clip: auto;
	background: var(--surface);
	color: var(--heading);
	font-weight: 700;
}

.site-shell {
	width: calc(100% - 2rem);
	max-width: var(--site-width);
	margin-inline: auto;
}

.reading-shell {
	width: calc(100% - 2rem);
	max-width: var(--reading-width);
	margin-inline: auto;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 40;
	border-bottom: 1px solid var(--border);
	background: rgba(255, 255, 255, 0.96);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 76px;
	gap: 1.5rem;
}

.site-branding {
	flex: 0 0 auto;
}

.site-title {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	color: var(--heading);
	font-size: clamp(1.35rem, 3vw, 1.75rem);
	font-weight: 700;
	line-height: 1.1;
	text-decoration: none;
}

.brand-mark {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 2.4rem;
	height: 2.4rem;
	border: 1px solid rgba(40, 123, 183, 0.2);
	border-radius: 12px;
	background: linear-gradient(145deg, #eef8fe, var(--surface-warm));
	color: var(--accent-dark);
	box-shadow: 0 4px 12px rgba(26, 69, 105, 0.08);
}

.theme-icon {
	display: block;
	width: 1.35rem;
	height: 1.35rem;
}

.brand-icon {
	width: 1.75rem;
	height: 1.75rem;
}

.site-navigation {
	position: relative;
}

.menu-toggle {
	display: none;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0.55rem 0.8rem;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: var(--surface);
	color: var(--heading);
	font-weight: 700;
	cursor: pointer;
}

.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
	display: block;
	width: 1.2rem;
	height: 2px;
	background: currentColor;
	content: "";
}

.menu-toggle-bars {
	position: relative;
}

.menu-toggle-bars::before {
	position: absolute;
	top: -6px;
}

.menu-toggle-bars::after {
	position: absolute;
	top: 6px;
}

.primary-menu,
.primary-menu .sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.primary-menu {
	display: flex;
	align-items: center;
	gap: 0.15rem;
}

.primary-menu > li {
	position: relative;
}

.primary-menu a {
	display: block;
	padding: 0.7rem 0.72rem;
	border-radius: 10px;
	color: var(--heading);
	font-size: 0.94rem;
	font-weight: 650;
	line-height: 1.25;
	text-decoration: none;
}

.primary-menu a:hover,
.primary-menu a:focus-visible,
.primary-menu .current-menu-item > a,
.primary-menu .current-menu-ancestor > a {
	background: var(--surface-soft);
	color: var(--accent-dark);
}

.primary-menu .menu-item-has-children > a::after {
	display: inline-block;
	width: 0.42rem;
	height: 0.42rem;
	margin-left: 0.5rem;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	content: "";
	transform: translateY(-0.15rem) rotate(45deg);
	transform-origin: center;
}

.primary-menu .sub-menu {
	position: absolute;
	top: calc(100% + 0.35rem);
	left: 0;
	display: none;
	width: 245px;
	padding: 0.45rem;
	border: 1px solid var(--border);
	border-radius: 14px;
	background: var(--surface);
	box-shadow: var(--shadow);
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
	display: block;
}

.site-main {
	min-height: 60vh;
	padding-block: clamp(2rem, 5vw, 4.5rem);
}

.breadcrumbs {
	margin-bottom: 1rem;
	color: var(--text-soft);
	font-size: 0.8rem;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.breadcrumbs p,
.breadcrumbs nav {
	margin: 0;
}

.entry-header .breadcrumbs {
	margin: 0.85rem 0 0;
}

.entry-header,
.archive-header,
.search-header,
.not-found-header {
	margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.entry-kicker,
.eyebrow {
	margin: 0 0 0.65rem;
	color: var(--accent-dark);
	font-size: 0.8rem;
	font-weight: 750;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.entry-kicker {
	width: fit-content;
	margin-bottom: 0.75rem;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	background: var(--surface-soft);
	letter-spacing: 0.055em;
}

.entry-kicker a {
	color: var(--accent-dark);
	text-decoration: none;
}

.entry-kicker a:hover {
	color: var(--heading);
}

.entry-title-row {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 0.55rem;
}

.entry-title-row h1 {
	flex: 0 1 auto;
	min-width: 0;
}

.entry-book-marker {
	flex: 0 0 auto;
	font-size: clamp(1.35rem, 3vw, 1.75rem);
	line-height: 1;
	opacity: 0.82;
}

.vless-banner {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 50;
	border-top: 1px solid #456e9a;
	background: #142e52;
	color: #f4f7fc;
	box-shadow: 0 -8px 24px rgba(9, 25, 48, 0.24);
}

body.has-vless-banner {
	padding-bottom: var(--vless-banner-height, 0px);
}

.vless-content {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	padding-top: 0.65rem;
	padding-bottom: 0.65rem;
}

.vless-text {
	font-size: 0.9rem;
	line-height: 1.5;
}

.vless-text a {
	color: #ffd166;
	font-weight: 700;
}

.vless-text a:hover,
.vless-text a:focus-visible {
	color: #ffe4a3;
}

.vless-close {
	display: inline-grid;
	width: 2rem;
	height: 2rem;
	margin-left: auto;
	padding: 0;
	border: 1px solid #7394b8;
	border-radius: 50%;
	background: #25466d;
	color: #f4f7fc;
	font: inherit;
	line-height: 1;
	cursor: pointer;
	place-items: center;
	flex: 0 0 auto;
}

.vless-close:hover,
.vless-close:focus-visible {
	border-color: #c5daef;
	background: #365d88;
	color: #ffffff;
}

.vless-text a:focus-visible,
.vless-close:focus-visible {
	outline-color: #ffd166;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--heading);
	font-family: Tahoma, Geneva, Verdana, Arial, sans-serif;
	line-height: 1.22;
	text-wrap: balance;
}

h1 {
	margin: 0;
	font-size: clamp(1.9rem, 4.6vw, 3rem);
	letter-spacing: -0.02em;
}

.entry-content {
	font-family: Tahoma, Geneva, Verdana, Arial, sans-serif;
	font-size: clamp(1.08rem, 1.25vw, 1.17rem);
	line-height: 1.72;
	overflow-wrap: anywhere;
}

.entry-content > :first-child {
	margin-top: 0;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote,
.entry-content pre,
.entry-content table,
.entry-content center {
	margin-top: 0;
	margin-bottom: 1.25em;
}

.entry-content h2 {
	margin: 2.15em 0 0.75em;
	padding-left: 0.7rem;
	border-left: 3px solid var(--accent-soft);
	font-size: clamp(1.55rem, 3vw, 2rem);
}

.entry-content h3 {
	margin: 1.85em 0 0.65em;
	font-size: clamp(1.3rem, 2.6vw, 1.65rem);
}

.entry-content h4 {
	margin: 1.6em 0 0.55em;
	font-size: 1.18rem;
}

.entry-content blockquote {
	margin-inline: 0;
	padding: 0.4rem 0 0.4rem 1.2rem;
	border-left: 3px solid var(--warm);
	color: #40566b;
}

.entry-content center {
	display: block;
	max-width: 100%;
	margin-block: 1.35em;
	text-align: center;
}

.entry-content center > :last-child {
	margin-bottom: 0;
}

.entry-content font {
	font-family: inherit;
}

.entry-content table {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	border-collapse: collapse;
}

.entry-content th,
.entry-content td {
	padding: 0.55rem 0.7rem;
	border: 1px solid var(--border);
	text-align: left;
}

.entry-content pre {
	max-width: 100%;
	padding: 1rem;
	overflow: auto;
	border-radius: 12px;
	background: #eef3f7;
	font-size: 0.9rem;
}

.entry-content iframe {
	width: 100%;
	border: 0;
}

.entry-content .alignleft {
	float: left;
	margin: 0.35rem 1.25rem 1rem 0;
}

.entry-content .alignright {
	float: right;
	margin: 0.35rem 0 1rem 1.25rem;
}

.entry-content .aligncenter {
	display: block;
	margin-inline: auto;
}

.entry-content::after {
	display: table;
	clear: both;
	content: "";
}

/* Neutral compatibility for the small set of builder-backed records. */
.entry-content .vc_row,
.entry-content .wpb_column,
.entry-content .vc_column_container,
.entry-content .wpb_wrapper {
	max-width: 100%;
}

.entry-content .vc_row {
	margin-inline: 0;
}

.entry-content aside.otlm-work-meta,
aside.otlm-work-meta {
	margin: 2rem 0 0;
	padding: 1rem 1.1rem;
	border: 1px solid var(--border);
	border-radius: 14px;
	background: var(--surface-soft);
	box-shadow: none;
	font-family: Tahoma, Geneva, Verdana, Arial, sans-serif;
	font-size: 0.9rem;
	line-height: 1.55;
}

aside.otlm-work-meta dl {
	margin: 0;
}

nav.seo-related-links {
	margin: 1.75rem 0;
	padding: 0.95rem 1.05rem;
	border: 1px solid var(--border);
	border-radius: 14px;
	background: var(--surface-soft);
	font-family: Tahoma, Geneva, Verdana, Arial, sans-serif;
	font-size: 0.88rem;
	line-height: 1.5;
}

nav.seo-related-links > :first-child {
	margin-top: 0;
}

nav.seo-related-links > :last-child {
	margin-bottom: 0;
}

nav.seo-related-links h2,
nav.seo-related-links h3 {
	margin: 0 0 0.65rem;
	padding: 0;
	border: 0;
	font-size: 1.05rem;
}

nav.seo-related-links ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

nav.seo-related-links li + li {
	border-top: 1px solid rgba(40, 123, 183, 0.12);
}

nav.seo-related-links li > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
	padding: 0.55rem 0.1rem;
	text-decoration: none;
}

nav.seo-related-links li > a::after {
	width: 0.4rem;
	height: 0.4rem;
	flex: 0 0 auto;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	content: "";
	transform: rotate(-45deg);
}

.entry-footer {
	margin-top: 2rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--border);
}

.post-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	align-items: center;
	font-size: 0.88rem;
}

.post-tags a {
	display: inline-block;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	background: var(--surface-soft);
	text-decoration: none;
}

.post-navigation {
	margin-top: 2rem;
}

.post-navigation .nav-links {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.post-navigation a {
	display: block;
	height: 100%;
	padding: 0.8rem 0.95rem;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: var(--surface);
	text-decoration: none;
}

.post-navigation a:hover {
	border-color: #b9d6e9;
	background: var(--surface-soft);
}

.post-navigation .nav-next {
	text-align: right;
}

.post-navigation .nav-next:only-child {
	grid-column: 2;
}

.post-navigation .nav-subtitle {
	display: block;
	margin-bottom: 0.25rem;
	color: var(--accent-dark);
	font-size: 0.78rem;
	font-weight: 700;
}

.post-navigation .nav-title {
	display: block;
	color: var(--heading);
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.45;
}

.supporting-area {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--border);
}

.supporting-area-inner {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem;
	align-items: start;
}

.widget {
	min-width: 0;
	padding: 1.15rem 1.2rem;
	border: 1px solid var(--border);
	border-radius: 15px;
	background: var(--surface);
	box-shadow: 0 6px 20px rgba(26, 69, 105, 0.04);
}

.widget-title,
.widget .wp-block-heading {
	margin: 0 0 0.8rem;
	font-size: 1.08rem;
}

.widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.widget_nav_menu li + li {
	border-top: 1px solid var(--border);
}

.widget_nav_menu a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
	padding: 0.62rem 0.15rem;
	color: var(--text);
	font-size: 0.88rem;
	text-decoration: none;
}

.widget_nav_menu a::after {
	width: 0.42rem;
	height: 0.42rem;
	flex: 0 0 auto;
	border-right: 1.5px solid var(--accent);
	border-bottom: 1.5px solid var(--accent);
	content: "";
	transform: rotate(-45deg);
}

.widget_nav_menu a:hover {
	color: var(--accent-dark);
}

.widget .tagcloud,
.widget .wp-block-tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0;
}

.widget .tag-cloud-link,
.widget .wp-block-tag-cloud a {
	display: inline-flex;
	align-items: center;
	min-height: 2rem;
	padding: 0.28rem 0.65rem;
	border: 1px solid var(--accent-soft);
	border-radius: 999px;
	background: var(--surface-soft);
	color: var(--accent-dark);
	font-size: 0.78rem !important;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none;
}

.widget .tag-cloud-link:hover,
.widget .wp-block-tag-cloud a:hover {
	border-color: #b9d6e9;
	background: #e2f1fa;
}

.widget p:empty,
.widget .wp-block-heading:empty {
	display: none;
}

.widget_block:has(> :only-child:empty) {
	display: none;
}

.archive-header,
.search-header {
	max-width: 760px;
}

.archive-description {
	margin-top: 1rem;
	color: var(--text-soft);
}

.archive-description > :last-child {
	margin-bottom: 0;
}

.archive-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.15rem;
}

.archive-card {
	display: flex;
	min-width: 0;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: 0 6px 20px rgba(26, 69, 105, 0.045);
}

.archive-card-image {
	flex: 0 0 150px;
	background: var(--surface-soft);
}

.archive-card-image img {
	width: 100%;
	height: 100%;
	min-height: 190px;
	object-fit: cover;
}

.archive-card-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
	padding: 1.25rem;
}

.archive-card-meta {
	margin: 0 0 0.45rem;
	color: var(--text-soft);
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.archive-card-title {
	margin: 0;
	font-size: clamp(1.25rem, 2.2vw, 1.55rem);
	text-wrap: initial;
}

.archive-card-title a {
	color: var(--heading);
	text-decoration: none;
}

.archive-card-title a:hover {
	color: var(--accent-dark);
}

.archive-card-excerpt {
	margin-top: 0.7rem;
	margin-bottom: 0.9rem;
	color: #465b6f;
	font-size: 0.94rem;
	line-height: 1.6;
}

.archive-card-excerpt p {
	margin: 0;
}

.archive-card-link {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	width: fit-content;
	margin-top: auto;
	padding: 0.38rem 0.68rem;
	border-radius: 999px;
	background: var(--surface-soft);
	font-size: 0.82rem;
	font-weight: 700;
	text-decoration: none;
}

.archive-card-link::after {
	width: 0.38rem;
	height: 0.38rem;
	border-top: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
	content: "";
	transform: rotate(45deg);
}

.archive-card-link:hover {
	background: var(--accent-soft);
}

.pagination {
	margin-top: 2.5rem;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 42px;
	min-height: 42px;
	padding: 0.3rem 0.65rem;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--surface);
	text-decoration: none;
}

.pagination .current {
	border-color: var(--accent);
	background: var(--accent);
	color: #fff;
}

.empty-state,
.not-found-content {
	padding: clamp(1.5rem, 4vw, 2.5rem);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
}

.search-form {
	display: flex;
	max-width: 560px;
	gap: 0.55rem;
	margin-top: 1.25rem;
}

.search-form label {
	flex: 1 1 auto;
}

.search-field {
	width: 100%;
	min-height: 46px;
	padding: 0.65rem 0.8rem;
	border: 1px solid #bdd2e2;
	border-radius: 10px;
	background: #fff;
	color: var(--text);
}

.search-submit,
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0.65rem 1rem;
	border: 1px solid var(--accent);
	border-radius: 11px;
	background: var(--accent);
	color: #fff;
	font-weight: 750;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.button:hover,
.search-submit:hover {
	border-color: var(--accent-dark);
	background: var(--accent-dark);
	color: #fff;
}

.button-secondary {
	border-color: rgba(23, 95, 148, 0.24);
	background: rgba(255, 255, 255, 0.78);
	color: var(--accent-dark);
}

.button-secondary:hover {
	background: #fff;
	color: var(--heading);
}

.home-main {
	padding-top: 0;
}

.home-hero {
	position: relative;
	overflow: hidden;
	padding-block: clamp(3.5rem, 9vw, 7rem);
	background: linear-gradient(145deg, #eaf6fd 0%, #f8fbfd 58%, #fff8df 100%);
}

.home-hero::after {
	position: absolute;
	right: -6rem;
	bottom: -8rem;
	width: 22rem;
	height: 22rem;
	border: 1px solid rgba(40, 123, 183, 0.12);
	border-radius: 50%;
	box-shadow: 0 0 0 3rem rgba(255, 255, 255, 0.16), 0 0 0 6rem rgba(40, 123, 183, 0.035);
	content: "";
}

.hero-content {
	position: relative;
	z-index: 1;
	max-width: 780px;
}

.hero-content h1 {
	max-width: 720px;
}

.hero-copy {
	max-width: 720px;
	margin: 1.25rem 0 0;
	color: #40576d;
	font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.75rem;
}

.home-section {
	padding-block: clamp(3rem, 7vw, 5.5rem);
}

.home-section + .home-section {
	border-top: 1px solid var(--border);
}

.home-section-soft {
	background: var(--surface-soft);
}

.section-heading {
	max-width: 750px;
	margin-bottom: 2rem;
}

.section-heading h2 {
	margin: 0;
	font-size: clamp(1.8rem, 4vw, 2.65rem);
}

.section-heading p {
	margin: 0.75rem 0 0;
	color: var(--text-soft);
}

.occasion-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
}

.occasion-card,
.section-card {
	display: block;
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text);
	text-decoration: none;
	transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.occasion-card {
	padding: 1.4rem;
	border-radius: var(--radius);
}

.occasion-card:hover,
.section-card:hover {
	transform: translateY(-2px);
	border-color: #b9d6e9;
	box-shadow: var(--shadow);
	color: var(--text);
}

.card-icon {
	display: inline-grid;
	place-items: center;
	width: 2.55rem;
	height: 2.55rem;
	margin-bottom: 0.85rem;
	border-radius: 12px;
	background: var(--surface-warm);
	color: var(--accent-dark);
}

.occasion-card h3,
.section-card h3 {
	margin: 0;
	font-size: 1.25rem;
}

.occasion-card p,
.section-card p {
	margin: 0.55rem 0 0;
	color: var(--text-soft);
	font-size: 0.93rem;
	line-height: 1.55;
}

.section-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.85rem;
}

.section-card {
	padding: 1.25rem;
	border-radius: 15px;
}

.about-copy {
	max-width: 800px;
	font-family: Tahoma, Geneva, Verdana, Arial, sans-serif;
	font-size: 1.08rem;
}

.about-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.65rem 1.5rem;
	margin: 1.5rem 0 0;
	padding: 0;
	list-style: none;
}

.about-list li {
	position: relative;
	padding-left: 1.35rem;
}

.about-list li::before {
	position: absolute;
	top: 0.72em;
	left: 0;
	width: 0.45rem;
	height: 0.45rem;
	border-radius: 50%;
	background: var(--warm);
	content: "";
}

.site-footer {
	padding-block: 2.5rem;
	border-top: 1px solid var(--border);
	background: #edf4f8;
	color: var(--text-soft);
}

.footer-inner {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 2rem;
}

.footer-brand {
	margin: 0;
	color: var(--heading);
	font-size: 1.2rem;
	font-weight: 700;
}

.footer-note,
.copyright {
	margin: 0.35rem 0 0;
	font-size: 0.85rem;
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.45rem 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-links a {
	font-size: 0.9rem;
	font-weight: 650;
	text-decoration: none;
}

/* Semantic manual directories generated from verified historical link runs. */
.library-directory {
	margin: 1.35rem 0;
}

.library-directory__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.55rem 0.7rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.library-directory__item {
	margin: 0;
	min-width: 0;
}

.library-directory__item a {
	display: block;
	height: 100%;
	padding: 0.72rem 0.85rem;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--surface-soft);
	color: var(--heading);
	font-size: 0.94em;
	font-weight: 650;
	line-height: 1.35;
	text-decoration: none;
	overflow-wrap: anywhere;
	transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.library-directory__item a:hover,
.library-directory__item a:focus-visible {
	border-color: var(--accent);
	background: var(--surface);
	color: var(--accent-dark);
}

/* Useful historical terminal links, retained as compact supporting navigation. */
.legacy-related-links {
	margin: 1.35rem 0;
	padding: 0.72rem;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: var(--surface-soft);
}

.legacy-related-links ul {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.legacy-related-links li {
	margin: 0;
	min-width: 0;
}

.legacy-related-links a {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	height: 100%;
	padding: 0.58rem 0.68rem;
	border: 1px solid rgba(45, 125, 154, 0.16);
	border-radius: 9px;
	background: rgba(255, 255, 255, 0.72);
	color: var(--heading);
	font-size: 0.92em;
	line-height: 1.4;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.legacy-related-links a::after {
	width: 0.38em;
	height: 0.38em;
	margin-left: auto;
	border-top: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
	content: "";
	transform: rotate(45deg);
	flex: 0 0 auto;
}

.legacy-related-links a:hover,
.legacy-related-links a:focus-visible {
	border-color: var(--accent);
	background: var(--surface);
	color: var(--accent-dark);
}

@media (max-width: 960px) {
	.js .menu-toggle {
		display: inline-flex;
	}

	.js .primary-menu-wrap {
		position: absolute;
		top: calc(100% + 0.55rem);
		right: 0;
		display: none;
		width: min(88vw, 360px);
		max-height: min(75vh, 620px);
		overflow-y: auto;
		padding: 0.55rem;
		border: 1px solid var(--border);
		border-radius: 14px;
		background: var(--surface);
		box-shadow: var(--shadow);
	}

	.js .site-navigation.is-open .primary-menu-wrap {
		display: block;
	}

	.primary-menu {
		align-items: stretch;
		flex-direction: column;
	}

	.primary-menu a {
		padding: 0.7rem 0.8rem;
	}

	.primary-menu .sub-menu {
		position: static;
		display: block;
		width: auto;
		margin-left: 0.8rem;
		padding: 0 0 0 0.5rem;
		border: 0;
		border-left: 1px solid var(--border);
		border-radius: 0;
		box-shadow: none;
	}

	.primary-menu .sub-menu a {
		font-size: 0.9rem;
		font-weight: 550;
	}

	.js .site-navigation.is-open .menu-item-has-children > a::after {
		transform: translateY(0.12rem) rotate(225deg);
	}

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

@media (max-width: 720px) {
	body {
		font-size: 16px;
	}

	.site-shell,
	.reading-shell {
		width: calc(100% - 1.25rem);
	}

	.header-inner {
		min-height: 66px;
		gap: 0.75rem;
	}

	.brand-mark {
		width: 2.15rem;
		height: 2.15rem;
	}

	.entry-content {
		font-size: 1.06rem;
		line-height: 1.72;
	}

	.vless-content {
		align-items: flex-start;
		gap: 0.6rem;
	}

	.archive-grid,
	.occasion-grid,
	.section-grid,
	.about-list,
	.library-directory__list,
	.legacy-related-links ul {
		grid-template-columns: 1fr;
	}

	.archive-card-image {
		flex-basis: 110px;
	}

	.archive-card-image img {
		min-height: 170px;
	}

	.post-navigation .nav-links,
	.supporting-area-inner {
		grid-template-columns: 1fr;
	}

	.post-navigation .nav-next {
		text-align: left;
	}

	.post-navigation .nav-next:only-child {
		grid-column: 1;
	}

	.search-form {
		align-items: stretch;
		flex-direction: column;
	}

	.footer-inner {
		flex-direction: column;
	}

	.footer-links {
		justify-content: flex-start;
	}
}

@media (max-width: 460px) {
	.site-title {
		font-size: 1.22rem;
	}

	.menu-toggle-label {
		display: none;
	}

	.entry-book-marker {
		display: none;
	}

	.archive-card {
		flex-direction: column;
	}

	.archive-card-image {
		flex-basis: auto;
	}

	.archive-card-image img {
		height: 180px;
		min-height: 0;
	}

	.entry-content .alignleft,
	.entry-content .alignright {
		float: none;
		display: block;
		margin: 1rem auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
