/* RJY Display technical article detail page */

.single-post {
	--rjy-post-blue: #064fc4;
	--rjy-post-blue-dark: #003c9d;
	--rjy-post-blue-soft: #eef5ff;
	--rjy-post-ink: #071426;
	--rjy-post-text: #24344a;
	--rjy-post-muted: #66758a;
	--rjy-post-line: #d9e2ee;
	--rjy-post-line-strong: #c5d1df;
	--rjy-post-panel: #f8fbff;
	background: #fff;
	color: var(--rjy-post-ink);
}

.single-post .site-content {
	background: linear-gradient(180deg, #fff 0%, #fff 70%, #f7faff 100%);
}

.single-post .site-content > .ast-container {
	display: block;
	width: 100%;
	max-width: none;
	padding: 0;
}

.single-post #primary {
	width: 100%;
	margin: 0;
	padding: 0;
}

.rjy-article-site-main {
	display: block;
}

.rjy-article-shell {
	width: min(calc(100% - 64px), 1440px);
	max-width: 1440px;
	margin: 0 auto;
	padding: 18px 0 20px;
}

.rjy-article-breadcrumb {
	display: flex;
	gap: 10px;
	align-items: center;
	overflow: hidden;
	margin: 0 0 30px;
	color: var(--rjy-post-muted);
	font-size: 12px;
	line-height: 1.4;
	white-space: nowrap;
}

.rjy-article-breadcrumb a {
	color: var(--rjy-post-text);
	text-decoration: none;
}

.rjy-article-breadcrumb span:last-child {
	overflow: hidden;
	text-overflow: ellipsis;
}

.rjy-article-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: 54px;
	align-items: start;
}

.rjy-article-main {
	min-width: 0;
}

.rjy-article-header {
	max-width: 900px;
	margin-bottom: 24px;
}

.rjy-article-kicker-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 22px;
	align-items: center;
	margin-bottom: 16px;
	color: var(--rjy-post-muted);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.35;
}

.rjy-article-kicker {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	padding: 4px 8px;
	border-radius: 3px;
	background: var(--rjy-post-blue-soft);
	color: var(--rjy-post-blue);
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 0.02em;
	text-decoration: none;
	text-transform: uppercase;
}

.rjy-article-title {
	max-width: 900px;
	margin: 0;
	color: #061536;
	font-family: var(--rjy-font-sans);
	font-size: clamp(38px, 4.4vw, 58px);
	font-weight: 850;
	line-height: 1.08;
	letter-spacing: 0;
	text-wrap: balance;
}

.rjy-article-excerpt {
	max-width: 770px;
	margin: 22px 0 0;
	color: var(--rjy-post-text);
	font-size: 17px;
	line-height: 1.65;
}

.rjy-article-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 26px;
	align-items: center;
	margin-top: 26px;
	color: var(--rjy-post-muted);
	font-size: 12px;
	line-height: 1.4;
}

.rjy-article-author {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	color: var(--rjy-post-ink);
	font-size: 13px;
	font-weight: 850;
}

.rjy-article-meta__item {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 24px;
	color: var(--rjy-post-blue);
	font-weight: 800;
}

.rjy-article-meta__item::before {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 1px solid #bfd3ff;
	border-radius: 50%;
	background: #fff;
	content: "";
}

.rjy-article-meta__item--tag::before {
	border-radius: 5px;
}

.rjy-article-hero {
	margin: 0 0 24px;
	overflow: hidden;
	border: 1px solid var(--rjy-post-line);
	border-radius: 8px;
	background: #eef3fb;
	box-shadow: 0 12px 30px rgba(21, 42, 76, 0.06);
}

.rjy-article-hero img {
	display: block;
	width: 100%;
	max-height: 430px;
	object-fit: cover;
}

.rjy-article-hero figcaption {
	padding: 10px 14px;
	color: var(--rjy-post-muted);
	font-size: 12px;
	line-height: 1.5;
	text-align: center;
}

.rjy-article-inline-toc {
	margin: 0 0 28px;
	padding: 22px 26px;
	border: 1px solid #e3ebf6;
	border-radius: 8px;
	background: linear-gradient(135deg, #f6faff 0%, #ffffff 100%);
}

.rjy-article-inline-toc h2 {
	margin: 0 0 14px;
	color: var(--rjy-post-ink);
	font-size: 13px;
	font-weight: 900;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.rjy-article-inline-toc ol {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 9px 34px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rjy-article-inline-toc li.is-extra {
	display: none;
}

.rjy-article-inline-toc.is-expanded li.is-extra {
	display: list-item;
}

.rjy-article-inline-toc a {
	color: var(--rjy-post-blue);
	font-size: 13px;
	font-weight: 750;
	line-height: 1.35;
	text-decoration: none;
}

.rjy-inline-toc-toggle {
	display: inline-flex;
	min-height: 34px;
	align-items: center;
	justify-content: center;
	margin-top: 16px;
	padding: 7px 14px;
	border: 1px solid #b9d1ff;
	border-radius: 4px;
	background: #fff;
	color: var(--rjy-post-blue);
	cursor: pointer;
	font-family: var(--rjy-font-sans);
	font-size: 12px;
	font-weight: 850;
	line-height: 1.25;
}

.rjy-inline-toc-toggle:hover {
	border-color: var(--rjy-post-blue);
}

.rjy-article-content {
	color: var(--rjy-post-text);
	font-family: var(--rjy-font-sans);
	font-size: 16px;
	line-height: 1.76;
}

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

.rjy-article-content > :last-child {
	margin-bottom: 0;
}

.rjy-article-content p,
.rjy-article-content ul,
.rjy-article-content ol,
.rjy-article-content blockquote,
.rjy-article-content figure,
.rjy-article-content table,
.rjy-article-content pre {
	margin-top: 0;
	margin-bottom: 1.45em;
}

.rjy-article-content h2,
.rjy-article-content h3,
.rjy-article-content h4 {
	color: #071b46;
	font-family: var(--rjy-font-sans);
	font-weight: 850;
	line-height: 1.28;
	letter-spacing: 0;
	scroll-margin-top: 84px;
}

.rjy-article-content h2 {
	margin: 2.1em 0 0.75em;
	font-size: clamp(24px, 2.7vw, 30px);
}

.rjy-article-content h3 {
	margin: 1.8em 0 0.68em;
	font-size: clamp(20px, 2.2vw, 24px);
}

.rjy-article-content h4 {
	margin: 1.6em 0 0.6em;
	font-size: 18px;
}

.rjy-article-content a {
	color: var(--rjy-post-blue);
	text-decoration-color: rgba(6, 79, 196, 0.35);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.rjy-article-content a:hover {
	color: var(--rjy-post-blue-dark);
	text-decoration-color: currentColor;
}

.rjy-article-content ul,
.rjy-article-content ol {
	padding-left: 1.28em;
}

.rjy-article-content li {
	margin-bottom: 0.46em;
	padding-left: 0.16em;
}

.rjy-article-content li::marker {
	color: var(--rjy-post-blue);
	font-weight: 800;
}

.rjy-article-content blockquote {
	margin-right: 0;
	margin-left: 0;
	padding: 6px 0 6px 22px;
	border-left: 3px solid var(--rjy-post-blue);
	color: #334765;
	font-size: 1.04em;
}

.rjy-article-content blockquote p:last-child {
	margin-bottom: 0;
}

.rjy-article-content img {
	max-width: 100%;
	height: auto;
	border-radius: 6px;
}

.rjy-article-content figcaption {
	margin-top: 9px;
	color: var(--rjy-post-muted);
	font-size: 12px;
	line-height: 1.55;
	text-align: center;
}

.rjy-article-content table {
	display: block;
	width: 100%;
	overflow-x: auto;
	border: 1px solid var(--rjy-post-line);
	border-radius: 6px;
	border-collapse: collapse;
	background: #fff;
	font-size: 13px;
	line-height: 1.48;
}

.rjy-article-content th,
.rjy-article-content td {
	min-width: 130px;
	padding: 12px 14px;
	border: 0;
	border-right: 1px solid var(--rjy-post-line);
	border-bottom: 1px solid var(--rjy-post-line);
	background: transparent;
	text-align: left;
	vertical-align: top;
}

.rjy-article-content th {
	background: #f4f7fb;
	color: var(--rjy-post-ink);
	font-size: 12px;
	font-weight: 850;
}

.rjy-article-content code {
	padding: 0.15em 0.34em;
	border-radius: 3px;
	background: #eef3fb;
	color: #243b5a;
	font-family: var(--rjy-font-mono);
	font-size: 0.86em;
}

.rjy-article-content pre {
	overflow-x: auto;
	padding: 18px;
	border: 1px solid var(--rjy-post-line);
	border-radius: 6px;
	background: #101b2e;
	color: #edf3fb;
	font-size: 14px;
	line-height: 1.62;
}

.rjy-article-content pre code {
	padding: 0;
	background: transparent;
	color: inherit;
}

.rjy-article-content hr {
	margin: 48px 0;
	border: 0;
	border-top: 1px solid var(--rjy-post-line-strong);
}

.rjy-article-support-panel {
	display: grid;
	grid-template-columns: 54px minmax(0, 1fr) auto;
	gap: 20px;
	align-items: center;
	margin: 34px 0 0;
	padding: 22px 26px;
	border: 1px solid #dce9fb;
	border-radius: 8px;
	background: linear-gradient(135deg, #eef6ff 0%, #ffffff 100%);
}

.rjy-article-support-panel__icon,
.rjy-sidebar-cta__icon,
.rjy-article-bottom-cta__icon {
	position: relative;
	display: inline-grid;
	width: 42px;
	height: 42px;
	border: 1px solid #bfd3ff;
	border-radius: 8px;
	background: #fff;
	place-items: center;
}

.rjy-article-support-panel__icon::before,
.rjy-sidebar-cta__icon::before,
.rjy-article-bottom-cta__icon::before {
	position: absolute;
	width: 18px;
	height: 18px;
	border: 2px solid var(--rjy-post-blue);
	border-radius: 5px;
	content: "";
}

.rjy-article-support-panel h2 {
	margin: 0 0 5px;
	color: var(--rjy-post-blue);
	font-size: 16px;
	font-weight: 900;
}

.rjy-article-support-panel p {
	margin: 0;
	color: var(--rjy-post-text);
	font-size: 13px;
	line-height: 1.5;
}

.rjy-article-button,
.rjy-article-button:visited {
	display: inline-flex;
	min-height: 42px;
	align-items: center;
	justify-content: center;
	padding: 11px 18px;
	border: 1px solid var(--rjy-post-blue);
	border-radius: 4px;
	background: var(--rjy-post-blue);
	color: #fff;
	font-size: 13px;
	font-weight: 850;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
}

.rjy-article-button:hover {
	border-color: var(--rjy-post-blue-dark);
	background: var(--rjy-post-blue-dark);
	color: #fff;
}

.rjy-article-button--light,
.rjy-article-button--light:visited {
	border-color: #fff;
	background: #fff;
	color: var(--rjy-post-blue);
}

.rjy-article-button--ghost,
.rjy-article-button--ghost:visited {
	border-color: rgba(255, 255, 255, 0.72);
	background: transparent;
	color: #fff;
}

.rjy-article-footer {
	margin-top: 34px;
	padding-top: 26px;
	border-top: 1px solid var(--rjy-post-line);
}

.rjy-article-tags,
.rjy-topic-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.rjy-article-tags a,
.rjy-topic-list a {
	display: inline-flex;
	min-height: 30px;
	align-items: center;
	padding: 6px 10px;
	border: 1px solid #cfe0ff;
	border-radius: 6px;
	background: var(--rjy-post-blue-soft);
	color: var(--rjy-post-blue);
	font-size: 12px;
	font-weight: 750;
	line-height: 1.25;
	text-decoration: none;
}

.rjy-post-navigation {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	margin-top: 28px;
}

.rjy-post-navigation__next {
	text-align: right;
}

.rjy-post-navigation span {
	display: block;
	margin-bottom: 6px;
	color: var(--rjy-post-muted);
	font-size: 11px;
	font-weight: 850;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.rjy-post-navigation a {
	color: var(--rjy-post-ink);
	font-size: 15px;
	font-weight: 800;
	line-height: 1.4;
	text-decoration: none;
}

.rjy-post-navigation a:hover {
	color: var(--rjy-post-blue);
}

.rjy-article-sidebar {
	position: sticky;
	top: 88px;
	display: grid;
	gap: 26px;
	min-width: 0;
}

.rjy-sidebar-card {
	padding: 26px 28px;
	border: 1px solid var(--rjy-post-line);
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 12px 30px rgba(21, 42, 76, 0.045);
}

.rjy-sidebar-card h2 {
	margin: 0 0 18px;
	color: #061536;
	font-size: 19px;
	font-weight: 900;
	line-height: 1.25;
}

.rjy-sidebar-related__list {
	display: grid;
	gap: 18px;
}

.rjy-sidebar-related__item {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr);
	gap: 14px;
	align-items: start;
	color: var(--rjy-post-ink);
	text-decoration: none;
}

.rjy-sidebar-related__image {
	display: block;
	width: 88px;
	height: 74px;
	overflow: hidden;
	border-radius: 6px;
	background:
		linear-gradient(135deg, rgba(6, 79, 196, 0.18), rgba(6, 79, 196, 0)),
		linear-gradient(180deg, #eef3fb, #ffffff);
}

.rjy-sidebar-related__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rjy-sidebar-related__item strong {
	display: block;
	color: var(--rjy-post-ink);
	font-size: 13px;
	font-weight: 850;
	line-height: 1.35;
}

.rjy-sidebar-related__item small {
	display: block;
	margin-top: 7px;
	color: var(--rjy-post-muted);
	font-size: 11px;
	line-height: 1.3;
}

.rjy-sidebar-more {
	display: inline-flex;
	margin-top: 20px;
	color: var(--rjy-post-blue);
	font-size: 13px;
	font-weight: 850;
	text-decoration: none;
}

.rjy-sidebar-more::after {
	margin-left: 7px;
	content: ">";
}

.rjy-sidebar-cta {
	text-align: center;
}

.rjy-sidebar-cta__icon {
	margin-bottom: 14px;
}

.rjy-sidebar-cta p {
	margin: 0 0 20px;
	color: var(--rjy-post-text);
	font-size: 13px;
	line-height: 1.58;
}

.rjy-sidebar-cta .rjy-article-button {
	width: 100%;
}

.rjy-article-bottom-cta {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	gap: 18px;
	align-items: center;
	margin: 28px 0 0;
	padding: 26px 32px;
	border-radius: 6px;
	background: linear-gradient(90deg, #003ca3, #005adb);
	color: #fff;
}

.rjy-article-bottom-cta > div {
	display: grid;
	grid-template-columns: 50px minmax(0, 1fr);
	gap: 14px;
	align-items: center;
}

.rjy-article-bottom-cta__icon {
	grid-row: span 2;
	border-color: rgba(255, 255, 255, 0.45);
	background: rgba(255, 255, 255, 0.12);
}

.rjy-article-bottom-cta__icon::before {
	border-color: #fff;
}

.rjy-article-bottom-cta h2 {
	margin: 0;
	color: #fff;
	font-size: 24px;
	font-weight: 900;
	line-height: 1.2;
}

.rjy-article-bottom-cta p {
	margin: 4px 0 0;
	color: rgba(255, 255, 255, 0.86);
	font-size: 14px;
	line-height: 1.4;
}

.rjy-article-comments {
	width: min(calc(100% - 64px), 900px);
	margin: 0 auto;
	padding: 36px 0 80px;
}

.rjy-article-comments .comments-area {
	padding-top: 28px;
	border-top: 1px solid var(--rjy-post-line);
}

@media (max-width: 1180px) {
	.rjy-article-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.rjy-article-sidebar {
		position: static;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

}

@media (max-width: 900px) {
	.rjy-article-shell {
		width: min(calc(100% - 36px), 1440px);
	}

	.rjy-article-sidebar,
	.rjy-article-inline-toc ol,
	.rjy-article-support-panel,
	.rjy-article-bottom-cta {
		grid-template-columns: minmax(0, 1fr);
	}

	.rjy-article-support-panel {
		align-items: start;
	}

	.rjy-article-bottom-cta .rjy-article-button,
	.rjy-article-support-panel .rjy-article-button {
		width: 100%;
	}
}

@media (max-width: 767px) {
	.rjy-article-shell {
		width: min(calc(100% - 32px), 1440px);
		padding-top: 12px;
	}

	.rjy-article-breadcrumb {
		margin-bottom: 22px;
	}

	.rjy-article-title {
		font-size: clamp(32px, 10vw, 44px);
	}

	.rjy-article-excerpt {
		font-size: 15px;
	}

	.rjy-article-meta {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}

	.rjy-article-hero img {
		min-height: 220px;
	}

	.rjy-article-inline-toc,
	.rjy-sidebar-card,
	.rjy-article-support-panel {
		padding: 20px;
	}

	.rjy-article-content {
		font-size: 15px;
		line-height: 1.72;
	}

	.rjy-post-navigation {
		grid-template-columns: minmax(0, 1fr);
	}

	.rjy-post-navigation__next {
		text-align: left;
	}

	.rjy-article-bottom-cta {
		padding: 22px 20px;
	}

	.rjy-article-bottom-cta > div {
		grid-template-columns: minmax(0, 1fr);
	}

	.rjy-article-bottom-cta__icon {
		grid-row: auto;
	}
}
