/* ==========================================================================
   建筑竞赛资讯 - 详情页样式（参考腾讯混元研究页：极简、理性、学术、内容优先）
   全部样式收敛在 .ac-detail 作用域内，避免污染主题。
   布局采用容器查询：主题内容区宽则三栏（目录/正文/引用），窄则自动降级。
   ========================================================================== */

.ac-detail {
	--ac-text: #1f2328;
	--ac-text-2: #57606a;
	--ac-text-3: #8b949e;
	--ac-link: #0969da;
	--ac-border: #d8dee4;
	--ac-border-soft: #eaeef2;
	--ac-bg-soft: #f6f8fa;
	--ac-blue-soft: #ddf4ff;
	--ac-green: #1a7f37;
	--ac-red: #cf222e;
	--ac-amber: #9a6700;
	--ac-offset: 96px; /* 预留主题吸顶导航的高度，可在主题自定义 CSS 中覆盖 */
	background: #fff;
	color: var(--ac-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
	-webkit-font-smoothing: antialiased;
}

.ac-detail__container.has-theme-sidebar .ac-detail__inner {
	max-width: none;
}

.ac-detail__shell {
	container-type: inline-size;
	padding: 40px 24px 80px;
}

.ac-detail__inner {
	display: grid;
	grid-template-columns: minmax(0, 720px);
	justify-content: center;
	gap: 0 52px;
}

@container (min-width: 1240px) {
	.ac-detail__inner { grid-template-columns: 216px minmax(0, 720px) 256px; }
	.ac-toc-rail      { grid-column: 1; grid-row: 1; }
	.ac-article       { grid-column: 2; grid-row: 1; }
	.ac-citations-rail{ grid-column: 3; grid-row: 1; }
}
@container (max-width: 1239px) {
	.ac-toc-rail       { grid-column: 1; grid-row: auto; }
	.ac-article        { grid-column: 1; grid-row: auto; }
	.ac-citations-rail { grid-column: 1; grid-row: auto; }
}

/* --------------------------------------------------------------------------
   左侧目录导航
   -------------------------------------------------------------------------- */
.ac-toc {
	position: sticky;
	top: calc(var(--ac-offset) + 24px);
	max-height: calc(100vh - var(--ac-offset) - 64px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 4px 0;
	font-size: 13px;
	line-height: 1.5;
	scrollbar-width: thin;
	scrollbar-color: var(--ac-border) transparent;
}
.ac-toc::-webkit-scrollbar { width: 4px; }
.ac-toc::-webkit-scrollbar-thumb { background: var(--ac-border); border-radius: 2px; }

.ac-toc__title {
	margin: 0 0 10px;
	padding: 0 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .12em;
	color: var(--ac-text-3);
}

.ac-toc__list a {
	display: block;
	padding: 5px 10px;
	border-left: 2px solid transparent;
	color: var(--ac-text-2);
	text-decoration: none;
	transition: color .15s ease, background-color .15s ease;
}
.ac-toc__list a:hover { color: var(--ac-link); }
.ac-toc__list a.is-h3 { padding-left: 26px; font-size: 12.5px; }
.ac-toc__list a.is-active {
	border-left-color: var(--ac-link);
	background: var(--ac-bg-soft);
	color: var(--ac-link);
	font-weight: 600;
}
.ac-toc__empty { padding: 0 10px; color: var(--ac-text-3); }

@container (max-width: 1239px) {
	.ac-toc {
		position: static;
		max-height: 208px;
		border: 1px solid var(--ac-border-soft);
		border-radius: 10px;
		padding: 14px 6px 14px 0;
		background: #fff;
	}
	.ac-toc__title { padding-left: 16px; }
}

/* --------------------------------------------------------------------------
   文章头部：大标题（独立设计字体） / 时间 + 发起主体 / 摘要卡片 / 关键信息
   -------------------------------------------------------------------------- */
.ac-article__header { margin-bottom: 12px; }

.ac-article__title {
	margin: 0 0 18px;
	font-family: Georgia, "Times New Roman", "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", serif;
	font-size: 33px;
	font-weight: 700;
	line-height: 1.42;
	letter-spacing: .015em;
	color: #111418;
}

/* 时间 + 发起主体（参考混元研究页 "2026-07-21 Hyra Team"） */
.ac-byline {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 26px;
	font-size: 13.5px;
	color: var(--ac-text-2);
}
.ac-byline time { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.ac-byline__sep {
	width: 1px;
	height: 12px;
	background: var(--ac-border);
}
.ac-byline__org { color: var(--ac-text-2); }

.ac-badge {
	display: inline-block;
	padding: 1px 9px;
	border-radius: 999px;
	font-size: 12px;
	line-height: 1.8;
	font-weight: 600;
}
.ac-badge.is-ongoing { color: var(--ac-link); background: var(--ac-blue-soft); }
.ac-badge.is-soon    { color: var(--ac-amber); background: #fff8c5; }
.ac-badge.is-closed  { color: var(--ac-text-3); background: var(--ac-bg-soft); }

.ac-abstract {
	padding: 18px 22px;
	border-radius: 10px;
	background: var(--ac-bg-soft);
	margin-bottom: 22px;
}
.ac-abstract__label {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	color: var(--ac-text-3);
}
.ac-abstract__text {
	margin: 0;
	font-size: 15px;
	line-height: 1.9;
	color: #424a53;
}

.ac-keyfacts {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 18px;
}
.ac-keyfacts__item {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 150px;
	padding: 10px 16px;
	border: 1px solid var(--ac-border-soft);
	border-radius: 10px;
	background: #fff;
}
.ac-keyfacts__k { font-size: 12px; color: var(--ac-text-3); }
.ac-keyfacts__v { font-size: 15px; font-weight: 650; color: var(--ac-text); font-variant-numeric: tabular-nums; }

.ac-article__keywords { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.ac-kw {
	padding: 2px 10px;
	border-radius: 6px;
	background: var(--ac-bg-soft);
	color: var(--ac-text-2);
	font-size: 12px;
	line-height: 1.7;
}

/* --------------------------------------------------------------------------
   正文排版（学术技术博客风格）
   -------------------------------------------------------------------------- */
.ac-content {
	font-size: 16px;
	line-height: 1.92;
	color: var(--ac-text);
	word-break: break-word;
}

.ac-content h2 {
	margin: 2.4em 0 1em;
	padding-bottom: .4em;
	border-bottom: 1px solid var(--ac-border-soft);
	font-size: 21px;
	font-weight: 700;
	line-height: 1.5;
	color: #111418;
	scroll-margin-top: var(--ac-offset);
}
.ac-content h3 {
	margin: 1.9em 0 .8em;
	font-size: 17px;
	font-weight: 650;
	color: #1c2128;
	scroll-margin-top: var(--ac-offset);
}
.ac-content h4 {
	margin: 1.6em 0 .7em;
	font-size: 15.5px;
	font-weight: 650;
}

.ac-content p { margin: 0 0 1.2em; text-align: justify; }

.ac-content strong { color: #111418; font-weight: 650; }
.ac-content em { font-style: normal; color: var(--ac-text-2); }

.ac-content a {
	color: var(--ac-link);
	text-decoration: underline;
	text-decoration-color: rgba(9, 105, 218, .35);
	text-underline-offset: 3px;
}
.ac-content a:hover { text-decoration-color: var(--ac-link); }

.ac-content ul, .ac-content ol { margin: 0 0 1.2em; padding-left: 1.6em; }
.ac-content li { margin-bottom: .5em; }
.ac-content li::marker { color: var(--ac-text-3); }

.ac-content blockquote {
	margin: 1.6em 0;
	padding: 2px 0 2px 18px;
	border-left: 3px solid var(--ac-border);
	color: var(--ac-text-2);
	font-size: 15px;
}
.ac-content blockquote p { margin-bottom: .6em; }

/* 图片 + 灰色居中图注 */
.ac-content figure {
	margin: 2.2em 0;
	text-align: center;
}
.ac-content figure img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}
.ac-content img { max-width: 100%; height: auto; }
.ac-content figcaption {
	margin-top: .8em;
	font-size: 13px;
	line-height: 1.7;
	color: var(--ac-text-2);
	text-align: center;
}

/* 数据对比表格 */
.ac-content table {
	width: 100%;
	margin: 1.8em 0;
	border-collapse: collapse;
	font-size: 14.5px;
	line-height: 1.6;
}
.ac-content th {
	padding: 9px 14px;
	border: 1px solid var(--ac-border);
	background: var(--ac-bg-soft);
	font-weight: 650;
	color: #363c42;
	text-align: left;
	white-space: nowrap;
}
.ac-content td {
	padding: 9px 14px;
	border: 1px solid var(--ac-border-soft);
	vertical-align: top;
}
.ac-content td.is-num, .ac-content th.is-num {
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.ac-trend { font-size: 11px; margin-right: 2px; }
.ac-trend.is-up   { color: var(--ac-green); }
.ac-trend.is-down { color: var(--ac-red); }

/* 流程图（横向，可换行） */
.ac-flow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px 6px;
	margin: 2em 0;
	padding: 18px 12px;
	border: 1px solid var(--ac-border-soft);
	border-radius: 10px;
	background: #fff;
}
.ac-flow-node {
	display: inline-block;
	padding: 7px 15px;
	border: 1px solid var(--ac-border);
	border-radius: 999px;
	background: #fff;
	font-size: 13.5px;
	font-weight: 550;
	color: var(--ac-text-2);
	white-space: nowrap;
}
.ac-flow-node.is-start { border-color: var(--ac-link); background: var(--ac-link); color: #fff; }
.ac-flow-node.is-key   { border-color: #d4a72c; background: #fff8c5; color: var(--ac-amber); }
.ac-flow-node.is-end   { border-color: #4ac26b; background: #dafbe1; color: #116329; }
.ac-flow-arrow {
	flex: none;
	color: var(--ac-text-3);
	font-size: 14px;
	line-height: 1;
	padding: 0 2px;
}

/* 时间线（日程安排） */
.ac-timeline {
	margin: 2em 0;
	padding: 4px 0 4px 22px;
	border-left: 2px solid var(--ac-border-soft);
}
.ac-timeline-item { position: relative; padding: 0 0 18px 8px; }
.ac-timeline-item:last-child { padding-bottom: 2px; }
.ac-timeline-item::before {
	content: "";
	position: absolute;
	left: -28px;
	top: 7px;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--ac-link);
}
.ac-timeline-item.is-past::before { background: var(--ac-border); border-color: var(--ac-border); }
.ac-timeline-date {
	display: block;
	font-size: 14px;
	font-weight: 650;
	color: var(--ac-text);
	font-variant-numeric: tabular-nums;
}
.ac-timeline-body { display: block; margin-top: 2px; font-size: 14px; color: var(--ac-text-2); }

/* 脚注：正文上标 + 引用区（宽屏位于右栏，窄屏位于文末） */
.ac-content sup.ac-fnref { font-size: 11px; line-height: 0; }
.ac-content sup.ac-fnref a {
	padding: 0 2px;
	text-decoration: none;
	color: var(--ac-link);
	font-weight: 600;
}

.ac-footnotes {
	margin: 2.6em 0 0;
	padding-top: 1.2em;
	border-top: 1px solid var(--ac-border-soft);
}
.ac-footnotes h2 {
	margin: 0 0 10px;
	padding: 0;
	border: 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	color: var(--ac-text-3);
}
.ac-footnotes ol { margin: 0; padding-left: 1.4em; }
.ac-footnotes li {
	margin-bottom: .7em;
	font-size: 12.5px;
	line-height: 1.7;
	color: var(--ac-text-2);
}
.ac-footnotes .ac-backref { color: var(--ac-text-3); text-decoration: none; margin-left: 4px; }
.ac-footnotes .ac-backref:hover { color: var(--ac-link); }

.ac-citations-rail .ac-footnotes { margin-top: 0; border-top: 0; }
@container (min-width: 1240px) {
	.ac-citations-rail .ac-footnotes {
		position: sticky;
		top: calc(var(--ac-offset) + 24px);
		max-height: calc(100vh - var(--ac-offset) - 64px);
		overflow-y: auto;
		scrollbar-width: thin;
	}
}

/* --------------------------------------------------------------------------
   回到顶部（左下角圆形按钮）
   -------------------------------------------------------------------------- */
.ac-backtop {
	position: fixed;
	left: 26px;
	bottom: 30px;
	z-index: 90;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--ac-border);
	border-radius: 50%;
	background: #fff;
	color: var(--ac-text-2);
	box-shadow: 0 4px 16px rgba(31, 35, 40, .1);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .2s ease, transform .2s ease, color .15s ease, border-color .15s ease;
}
.ac-backtop.is-show { opacity: 1; visibility: visible; transform: translateY(0); }
.ac-backtop:hover { color: var(--ac-link); border-color: var(--ac-link); }

/* --------------------------------------------------------------------------
   小屏适配
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
	.ac-detail__shell { padding: 24px 16px 64px; }
	.ac-article__title { font-size: 25px; }
	.ac-abstract { padding: 14px 16px; }
	.ac-content { font-size: 15.5px; }
	.ac-keyfacts__item { flex: 1 1 100%; }
}
