/* ============================================================================
   1. 页面布局
   ========================================================================== */

/* 宽屏下限制页面容器宽度。 */
@media (min-width: 1350px) {
	.container {
		max-width: 1300px;
	}
}

/* 侧边栏：27.2%。 */
.col-lg-4 {
	-ms-flex: 0 0 27.2%;
	flex: 0 0 27.2%;
	max-width: 27.2%;
}

/* 主内容栏：72.8%。 */
.col-lg-8 {
	-ms-flex: 0 0 72.8%;
	flex: 0 0 72.8%;
	max-width: 72.8%;
}


/* ============================================================================
   2. 文章标题
   ========================================================================== */

/* 标题的共用字重、行高与间距。 */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
	font-weight: 600;
	line-height: 1.25;
	margin-top: 24px;
	margin-bottom: 16px;
	word-wrap: break-word;
}

/* H1、H2 使用分隔线建立章节层级。 */
.entry-content h1 {
	font-size: 2em;
	color: #616161;
	padding-bottom: 0.3em;
	border-bottom: 1px solid #eeeeee;
}

.entry-content h2 {
	font-size: 1.5em;
	color: #616161;
	padding-bottom: 0.3em;
	border-bottom: 1px solid #eeeeee;
	display: block;
}

.entry-content h2:before {
	content: none;
}

/* H3 以下仅通过字号区分层级。 */
.entry-content h3 {
	font-size: 1.25em;
	color: #616161;
	padding-bottom: 0;
	border-bottom: none;
}

.entry-content h3:after {
	content: none;
}

.entry-content h4 {
	font-size: 1em;
	color: #616161;
}

.entry-content h5 {
	font-size: 0.875em;
	color: #616161;
}

.entry-content h6 {
	font-size: 0.85em;
	color: #616161;
}

/* 正文以标题开头时移除多余的顶部间距。 */
.entry-content > h1:first-child,
.entry-content > h2:first-child,
.entry-content > h3:first-child,
.entry-content > h4:first-child,
.entry-content > h5:first-child,
.entry-content > h6:first-child {
	margin-top: 0;
}


/* ============================================================================
   3. 面包屑导航
   ========================================================================== */

.breadcrumbs-area {
	padding: 20px 0;
	position: relative;
	margin-bottom: 20px;
}

.breadcrumbs-area h2,
.h2 {
	font-size: 2.0rem;
	color: #5869DA;
	margin-bottom: 1rem;
}


/* ============================================================================
   4. 文章正文元素
   ========================================================================== */

/* 4.1. 基础正文、链接与分隔线 */
.entry-content {
	font-size: 16px;
	line-height: 1.5;
	word-wrap: break-word;
}

.entry-content p {
	margin-top: 0;
	margin-bottom: 16px;
}

.entry-content a:not(.button) {
	color: #5869DA;
	text-decoration: underline;
}

.entry-content a:not(.button):hover {
	color: #3f51b5;
	text-decoration: underline;
}

.entry-content hr {
	height: 1px;
	margin: 1.5rem 0;
	padding: 0;
	background-color: #eeeeee;
	border: 0;
}

/* 4.2. 有序列表、无序列表与任务列表 */
.entry-content ul,
.entry-content ol {
	margin-top: 0;
	margin-bottom: 16px;
	padding-left: 3em !important;
	list-style-position: outside;
}

.entry-content ul {
	list-style-type: disc !important;
}

.entry-content ol {
	list-style-type: decimal !important;
}

/* 恢复主题可能隐藏的原生标记：ol 为数字，ul 为实心圆点。 */
.entry-content ol > li:not(.task-list-item) {
	display: list-item !important;
	list-style-type: decimal !important;
}

.entry-content ul > li:not(.task-list-item) {
	display: list-item !important;
	list-style-type: disc !important;
}

/* 只加粗列表标记，不改变列表正文的字重。 */
.entry-content ol > li:not(.task-list-item)::marker,
.entry-content ul > li:not(.task-list-item)::marker {
	font-weight: 700;
}

.entry-content li {
	margin-top: 0;
	word-wrap: break-word;
}

.entry-content li + li {
	margin-top: 0.25em;
}

.entry-content li > ul,
.entry-content li > ol {
	margin-top: 0;
	margin-bottom: 0;
}

.entry-content li > p {
	margin-top: 16px;
}

.entry-content .task-list-item {
	list-style: none;
}

.entry-content .task-list-item input[type="checkbox"] {
	margin: 0 0.5rem 0 -1.5rem;
	vertical-align: middle;
}

/* 4.3. TOC+ 目录隔离 */
/* 目录编号由插件的 .toc_number 生成，不再叠加正文列表的原生标记。 */
.entry-content #toc_container ul,
.entry-content #toc_container ol {
	padding-left: 0 !important;
	list-style: none !important;
}

.entry-content #toc_container ul > li,
.entry-content #toc_container ol > li {
	list-style: none !important;
}

.entry-content #toc_container li::marker {
	content: "";
}

/* 目录链接沿用插件样式，不继承正文链接的常驻下划线。 */
.entry-content #toc_container a:not(.button),
.entry-content #toc_container a:not(.button):hover {
	text-decoration: none;
}

/* 4.4. 行内代码与键盘按键 */
.entry-content code {
	font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 0.875em;
	margin: 0 0.15em;
	padding: 0.2em 0.4em;
	color: #C7254E;
	background-color: #F9F2F4;
	border: 1px solid #eeeeee;
	border-radius: 6px;
	word-break: break-word;
}

.entry-content kbd {
	display: inline-block;
	padding: 0.2em 0.4em;
	font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 0.875em;
	line-height: 1;
	color: #616161;
	background-color: #f6f8fa;
	border: 1px solid #a7a2a2;
	border-radius: 6px;
	box-shadow: inset 0 -1px 0 #a7a2a2;
}

/* 4.5. 表格 */
.entry-content table {
	display: block;
	width: max-content;
	max-width: 100%;
	overflow-x: auto;
	margin: 0 0 16px;
	font-size: 16px;
	line-height: 1.5;
	border: 0;
	border-spacing: 0;
	border-collapse: collapse;
}

.entry-content table th,
.entry-content table td {
	padding: 6px 13px;
	border: 1px solid #a7a2a2;
}

.entry-content table th {
	font-weight: 600;
	background-color: #f6f8fa;
}

.entry-content table tr:nth-child(2n) {
	background-color: #f6f8fa;
}

/* 4.6. 图片与说明文字 */
.entry-content img {
	max-width: 100%;
	height: auto;
	box-sizing: border-box;
	border-radius: 6px;
}

.entry-content figure {
	margin: 1.5rem 0;
}

.entry-content figcaption {
	margin-top: 0.5rem;
	color: #555;
	font-size: 0.875rem;
	text-align: center;
}


/* ============================================================================
   5. Prism.js 代码块
   ========================================================================== */

/* 代码块及其工具栏容器。 */
.entry-content .code-toolbar {
	position: relative;
	max-width: 100%;
	margin: 1rem 0;
}

/* 同时兼容带或不带 .code-toolbar 的 pre。 */
.entry-content pre {
	overflow: auto;
	margin: 0 0 1rem;
	border-radius: 6px;
}

.entry-content .code-toolbar pre[class*="language-"] {
	margin: 0;
	border-radius: 6px;
}

/* 语言标签和复制按钮。 */
.entry-content .code-toolbar .toolbar {
	position: absolute;
	top: 0.5em;
	right: 0.5em;
	z-index: 10;
	opacity: 0.8;
	transition: opacity 0.3s ease-in-out;
}

/* 悬停时完整显示工具栏。 */
.entry-content .code-toolbar:hover .toolbar {
	opacity: 1;
}

/* 复制按钮和语言标签的悬停反馈。 */
.entry-content .code-toolbar .toolbar .toolbar-item button:hover,
.entry-content .code-toolbar .toolbar .toolbar-item span:hover {
	background-color: #c5cae9;
	color: #3f51b5;
}

/* 清除 pre 内 code 继承的行内代码样式。 */
.entry-content pre code {
	margin: 0;
	padding: 0;
	background-color: transparent;
	border: 0;
	border-radius: 0;
	color: inherit;
	font-size: inherit;
	word-break: normal;
}


/* ============================================================================
   6. 自定义引用块
   ========================================================================== */

/* 蓝色左边框与浅色背景沿用博客原有设计。 */
.entry-content blockquote {
	border-left: 5px solid #5869DA;
	margin: 1.8em 0;
	padding: 1em 1.5em;
	background-color: #f6f8fa;
	color: #555;
	border-radius: 6px;
}

/* 清除引用块首段的默认段落间距。 */
.entry-content blockquote p {
	margin: 0;
	padding: 0;
}

/* 多段引用之间保留段落间距。 */
.entry-content blockquote p + p {
	margin-top: 1em;
}

/* 引用块内的强调文字使用博客主色。 */
.entry-content blockquote p strong {
	color: #5869DA;
	font-weight: 600;
}
