/* ==========================================================================
   Rocket Clean additions (kept outside the reused design stylesheet)
   ========================================================================== */

.rc-icon {
	vertical-align: -0.125em;
}

button.action-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25em;
	min-height: 2.25em;
	padding: 0;
	border: 0;
	border-radius: 0.3rem;
	background: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

button.action-link:hover {
	background: var(--bg-color-2);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
	display: inline-flex;
	align-items: center;
}

body[data-theme="dark"] .theme-toggle .icon-sun {
	display: none;
}

body[data-theme="light"] .theme-toggle .icon-moon {
	display: none;
}

@media (min-width: 992px) {
	.layout-row[data-visibility="mobile"] {
		display: none !important;
	}
}

@media (max-width: 991.98px) {
	.layout-row[data-visibility="desktop"] {
		display: none !important;
	}
}

body.admin-bar #header {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar #header {
		top: 46px;
	}
}

.skip-link {
	position: absolute;
	inset-inline-start: -9999px;
	top: 0;
	z-index: 100000;
	padding: 0.75em 1em;
	background: #ffffff;
	color: #000000;
}

.skip-link:focus {
	inset-inline-start: 1em;
	top: 1em;
}

:where(a, button, input, textarea, select):focus-visible {
	outline: 3px solid var(--site-color);
	outline-offset: 2px;
}

.widgets-area .widget-header {
	padding: 0.25em 0 0.75em;
}

.widgets-area .widget-title {
	margin: 0;
	font-size: 1.1em;
}

.item-title a {
	color: inherit;
}

#scroll-top {
	position: fixed;
	inset-inline-end: 1rem;
	bottom: 1rem;
	z-index: 60;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	background: var(--site-color);
	color: #ffffff;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

#scroll-top.is-visible {
	opacity: 1;
	visibility: visible;
}

body.overlay-menu-opened,
body.overlay-search-opened {
	overflow: hidden;
}

/* Keep the off-canvas panel out of the tab order while it is closed. */
body.overlay-panels-over-body #overlay-menu-outer {
	visibility: hidden;
}

body.overlay-panels-over-body.overlay-menu-opened #overlay-menu-outer {
	visibility: visible;
}

/* The reused stylesheet uses a near-white close icon that disappears on the
   white panels of this rebuild. Give both close controls a visible surface. */
:is(#overlay-menu-outer, #overlay-search-outer) .overlay-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: var(--bg-color-2) !important;
	color: var(--text-color) !important;
	font-size: 1.35rem;
	line-height: 1;
}

#overlay-search {
	position: relative;
}

/* The original search close control sits below the panel, outside it. */
#overlay-search .overlay-close {
	position: absolute;
	top: 0.75rem;
	inset-inline-end: 0.75rem;
	inset-inline-start: auto;
	bottom: auto;
	transform: none;
}

@media (min-width: 992px) {
	body.side-layouts-left .primary-content-primary {
		order: 2;
	}

	body.side-layouts-left #widgets-area-archive_side,
	body.side-layouts-left #widgets-area-singular_side {
		order: 1;
	}

	body.side-layouts-right #widgets-area-archive_side,
	body.side-layouts-right #widgets-area-singular_side {
		order: 2;
	}
}

.search-form .search-form-inner {
	display: flex;
	align-items: stretch;
	gap: 0.5rem;
}

.search-form .search-field {
	flex: 1 1 auto;
	min-width: 0;
}

#overlay-search .search-form {
	width: 100%;
}

.site-logo .custom-logo-link {
	display: inline-block;
}

/* The reused stylesheet hides the text logo because the commercial theme
   always shipped a logo image. This rebuild ships no branding image. */
.site-logo .title {
	display: inline-block;
}

/* The reused stylesheet hides the submit button and relies on an icon that
   was submitted by the removed theme script. Keep a real, visible button. */
.search-form .search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35em;
	min-width: 2.75em;
	background: var(--site-color);
	color: #ffffff;
	border-radius: var(--site-border-radius);
	cursor: pointer;
}

.search-form .search-submit .rc-icon {
	width: 1.1em;
	height: 1.1em;
}

/* The reused stylesheet hides every share network except its original four. */
.singular-share-inner a[data-site_name="telegram"] {
	display: flex;
}

/* Dropdown indicator for parent menu items (no icon font needed). */
.nav-menu li.menu-item-has-children > a > div::after {
	content: "";
	width: 0.4em;
	height: 0.4em;
	margin-inline-start: 0.35em;
	border-inline-end: 1.5px solid currentColor;
	border-block-end: 1.5px solid currentColor;
	transform: rotate(45deg);
}

/* Ad units and administrator test placeholders. */
.rc-ad {
	margin-block: var(--rc-ad-mt, var(--site-gap)) var(--rc-ad-mb, var(--site-gap));
	text-align: center;
}

.rc-ad-after_header,
.rc-ad-before_footer,
.rc-ad-archive_before_list,
.rc-ad-archive_after_list {
	margin-inline: auto;
	max-width: 100%;
}

.rc-ad-inner,
.rc-ad-test-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
}

.rc-ad-label {
	display: block;
	color: var(--text-color-muted, currentColor);
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-transform: uppercase;
}

.rc-ad .adsbygoogle {
	margin-inline: auto;
}

.items-list .rc-ad-list-item {
	grid-column: 1 / -1;
	grid-row: auto;
	display: block;
	width: 100%;
	list-style: none;
}

.items-list .rc-ad-list-item .rc-ad {
	margin-block: 0.5rem;
}

.rc-ad-test {
	padding: 1rem;
	border: 2px dashed var(--site-color);
	border-radius: var(--site-border-radius);
	background: color-mix(in srgb, var(--site-color) 7%, transparent);
}

.rc-ad-test-inner strong {
	color: var(--site-color);
}

.rc-ad-test-inner span {
	max-width: 70ch;
	font-size: 0.85rem;
	line-height: 1.5;
	opacity: 0.85;
}

@media (max-width: 767.98px) {
	.rc-ad-device-desktop {
		display: none !important;
	}
}

@media (min-width: 768px) {
	.rc-ad-device-mobile {
		display: none !important;
	}
}

@media (min-width: 768px) and (max-width: 1199.98px) {
	body:not(.rc-admin-preview) .rc-ad-device-desktop,
	body:not(.rc-admin-preview) .rc-ad-device-mobile {
		display: none !important;
	}
}

@media (max-width: 767.98px), (min-width: 1200px) {
	.rc-ad-device-tablet {
		display: none !important;
	}
}

.rc-ad-container-boxed {
	max-width: var(--rc-content-width, 1200px);
	margin-inline: auto;
}

.rc-ad-container-wide {
	max-width: min(100%, calc(var(--rc-content-width, 1200px) + 3rem));
	margin-inline: auto;
}

.rc-ad-container-full {
	width: 100%;
	max-width: none;
	margin-inline: 0;
}

.rc-ad-align-start {
	text-align: start;
}

.rc-ad-align-center {
	text-align: center;
}

.rc-ad-align-end {
	text-align: end;
}

/* Ticker ------------------------------------------------------------------ */
.rc-ticker {
	position: relative;
	overflow: hidden;
	border-block: 1px solid var(--bg-color-2);
	background: var(--bg-color-2);
	color: var(--text-color);
}

.rc-ticker-container {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 3.25rem;
	padding-block: 0.4rem;
}

.rc-ticker-label {
	flex: 0 0 auto;
	padding: 0.42rem 0.75rem;
	border-radius: var(--site-border-radius);
	background: var(--site-color);
	color: #ffffff;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.rc-ticker-viewport {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to left, transparent, #000 1.5rem, #000 calc(100% - 1.5rem), transparent);
	mask-image: linear-gradient(to left, transparent, #000 1.5rem, #000 calc(100% - 1.5rem), transparent);
}

.rc-ticker-track {
	display: flex;
	align-items: center;
	gap: 0;
	width: max-content;
	animation: rc-ticker-scroll var(--rc-ticker-duration, 35s) linear infinite;
}

.rc-ticker-group {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 2rem;
	padding-inline-end: 2rem;
}

.rc-ticker-item {
	color: inherit;
	font-size: 0.86rem;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: none !important;
	white-space: nowrap;
}

.rc-ticker-item:hover {
	color: var(--site-color);
}

.rc-ticker-separator {
	color: var(--site-color);
	font-size: 0.7rem;
}

.rc-ticker:hover .rc-ticker-track,
.rc-ticker:focus-within .rc-ticker-track {
	animation-play-state: paused;
}

@keyframes rc-ticker-scroll {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-50%);
	}
}

body.rc-ticker-after_header .rc-ticker-after_header {
	margin-block: 0;
}

body.rc-ticker-before_footer .rc-ticker-before_footer {
	margin-block: 0;
}

/* Social links ------------------------------------------------------------- */
.rc-social-links {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.rc-social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 2.15rem;
	block-size: 2.15rem;
	border: 1px solid var(--bg-color-2);
	border-radius: 50%;
	background: var(--bg-color);
	color: var(--text-color);
	text-decoration: none;
	transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.rc-social-link:hover,
.rc-social-link:focus-visible {
	border-color: var(--site-color);
	background: var(--site-color);
	color: #ffffff;
}

.rc-social-link .rc-icon {
	inline-size: 1.05rem;
	block-size: 1.05rem;
}

.rc-social-links-header {
	gap: 0.2rem;
}

.rc-social-links-header .rc-social-link {
	inline-size: 1.9rem;
	block-size: 1.9rem;
	border-color: transparent;
	background: transparent;
}

.rc-social-links-header .rc-social-link:hover {
	background: var(--site-color);
}

.rc-social-links-widget .rc-social-link {
	inline-size: 2rem;
	block-size: 2rem;
}

/* Cards ------------------------------------------------------------------- */
.item-terms {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
}

.item-terms a {
	display: inline-block;
	padding: 0.18rem 0.48rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--site-color) 12%, transparent);
	color: var(--site-color);
	font-size: 0.68rem;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none !important;
}

.item-terms a:hover {
	background: var(--site-color);
	color: #ffffff;
}

.item-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.35rem 0.8rem;
	color: var(--text-color-muted, currentColor);
	font-size: 0.73rem;
	line-height: 1.4;
	opacity: 0.82;
}

.item-meta-author,
.item-meta-date {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
}

.item-meta .rc-icon {
	inline-size: 0.85rem;
	block-size: 0.85rem;
}

.item-excerpt {
	color: var(--text-color-muted, currentColor);
	font-size: 0.82rem;
	line-height: 1.65;
	opacity: 0.9;
}

.item-read-more {
	align-self: flex-start;
	margin-top: auto;
	color: var(--site-color);
	font-size: 0.78rem;
	font-weight: 700;
	text-decoration: none !important;
}

.item-read-more:hover {
	text-decoration: underline !important;
	text-underline-offset: 0.2em;
}

.items-list .style-overlay .item-terms a,
.items-list .style-overlay .item-excerpt,
.items-list .style-overlay .item-meta,
.items-list .style-overlay .item-read-more {
	color: inherit;
}

.items-list .style-overlay .item-terms a {
	background: rgba(255, 255, 255, 0.18);
}

/* Related posts ------------------------------------------------------------ */
.rc-related-posts {
	margin-block: calc(var(--site-gap) * 1.35);
	padding-block-start: var(--site-gap);
	border-block-start: 1px solid var(--bg-color-2);
}

.rc-related-title {
	margin: 0 0 0.85rem;
	padding-inline-start: 0.65rem;
	border-inline-start: 4px solid var(--site-color);
	font-size: 1.08rem;
	font-weight: 800;
	line-height: 1.4;
}

.rc-related-posts .items-list {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.rc-related-posts .items-list .item {
	grid-column: auto;
	grid-row: auto;
}

/* Archive taxonomy links --------------------------------------------------- */
.archive-term-links {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-block: 0.65rem;
	font-size: 0.8rem;
}

.archive-term-links .label {
	color: var(--text-color-muted, currentColor);
	font-weight: 600;
}

.archive-term-links a {
	display: inline-block;
	padding: 0.2rem 0.55rem;
	border: 1px solid var(--bg-color-2);
	border-radius: 999px;
	background: var(--bg-color);
	color: inherit;
	font-size: 0.76rem;
	line-height: 1.5;
	text-decoration: none !important;
}

.archive-term-links a:hover {
	border-color: var(--site-color);
	background: var(--site-color);
	color: #ffffff;
}

/* Reading time and singular meta ------------------------------------------ */
.post-meta-item[data-type="reading_time"] {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
}

@media (prefers-reduced-motion: reduce) {
	.rc-ticker-track {
		animation: none;
		transform: none;
	}
}

@media (max-width: 575.98px) {
	.rc-ticker-container {
		gap: 0.45rem;
	}

	.rc-ticker-label {
		padding: 0.35rem 0.55rem;
		font-size: 0.7rem;
	}

	.rc-ticker-group {
		gap: 1.25rem;
		padding-inline-end: 1.25rem;
	}

	.rc-ticker-item {
		font-size: 0.8rem;
	}

	.rc-related-posts .items-list {
		grid-template-columns: 1fr;
	}
}
