/* 设计变量：主色 / 描边 / 斑马纹 / 圆角 / 表头吸附距离 */
:root {
	--ct-brand: #6140BD;
	--ct-brand-soft: #F1EDFB;
	--ct-line: #E7E2F2;
	--ct-line-soft: #F1EEF8;
	--ct-row-alt: #FBFAFE;
	--ct-row-hover: #F4EFFC;
	--ct-text: #3D3D3D;
	--ct-text-strong: #2B2B2B;
	--ct-muted: #8A86A0;
	--ct-radius: 9px;
	--ct-th-top: 80px;        /* 吸附表头到顶距离 = 站点固定页头高度 */
}

@media screen and (max-width: 600px) {
	:root { --ct-th-top: 60px; }
}


/* 正文容器：开启容器查询，让表格按内容区宽度（而非视口宽度）降级 */
.inforconts .page3_content_m {
	container-type: inline-size;
}


/* 表格骨架：固定列宽 + 斑马纹 + 悬停高亮，宽度填满内容区 */
.inforconts .page3_content_m table {
	display: table !important;        /* 修正 responsive.css 中 display:block 造成的列错乱 */
	width: 100% !important;
	max-width: 100% !important;
	table-layout: fixed;
	border-collapse: separate;
	border-spacing: 0;
	margin: 20px 0 8px;
	background: #fff;
	border: 1px solid var(--ct-line);
	border-radius: var(--ct-radius);
	box-shadow: 0 2px 12px rgba(97, 64, 189, .07);
	overflow: visible !important;
	font-size: 14px;
	line-height: 1.55;
	text-align: left;
	color: var(--ct-text);
}

/* 表格内文字统一为站点主字体：富文本常带 inline 宋体，会破坏数字列对齐 */
.inforconts .page3_content_m table span {
	font-family: inherit !important;
}

/* 列宽：序号 / 类别 / 竞赛名称 / 参赛级别 / 承办单位 / 负责人 */
.inforconts .page3_content_m table tr:first-child td:nth-child(1) { width: 56px; }
.inforconts .page3_content_m table tr:first-child td:nth-child(2) { width: 68px; }
.inforconts .page3_content_m table tr:first-child td:nth-child(3) { width: auto; }
.inforconts .page3_content_m table tr:first-child td:nth-child(4) { width: 178px; }
.inforconts .page3_content_m table tr:first-child td:nth-child(5) { width: 196px; }
.inforconts .page3_content_m table tr:first-child td:nth-child(6) { width: 80px; }


/* 数据行：内边距 / 描边 / 列对齐 / 斑马纹 / 悬停高亮 */
.inforconts .page3_content_m table td {
	box-sizing: border-box;
	padding: 9px 12px;
	border: 0;
	border-bottom: 1px solid var(--ct-line-soft);
	background: #fff;
	vertical-align: middle;
	text-align: left;
	word-break: break-word;
	overflow-wrap: anywhere;
}

/* 斑马纹：长表横向读数不串行 */
.inforconts .page3_content_m table tr:nth-child(even) td {
	background: var(--ct-row-alt);
}

/* 悬停整行高亮 + 左侧主色指示条 */
.inforconts .page3_content_m table tr:hover td {
	background: var(--ct-row-hover);
}

.inforconts .page3_content_m table tr:hover td:first-child {
	box-shadow: inset 3px 0 0 var(--ct-brand);
}

/* 列对齐：序号 / 类别 / 负责人居中，其余左对齐 */
.inforconts .page3_content_m table td:nth-child(1),
.inforconts .page3_content_m table td:nth-child(2),
.inforconts .page3_content_m table td:nth-child(6) {
	text-align: center;
}

/* 序号：弱化 + 等宽数字，便于纵向扫读 */
.inforconts .page3_content_m table td:nth-child(1) {
	color: var(--ct-muted);
	font-size: 13px;
	font-variant-numeric: tabular-nums;
}

/* 类别：未增强时也用主色区分 */
.inforconts .page3_content_m table td:nth-child(2) {
	color: var(--ct-brand);
	font-weight: 600;
}

/* 竞赛名称：略加深 */
.inforconts .page3_content_m table td:nth-child(3) {
	color: var(--ct-text-strong);
}

/* 末行去下划线 + 底部圆角 */
.inforconts .page3_content_m table tr:last-child td {
	border-bottom: 0;
}

.inforconts .page3_content_m table tr:last-child td:first-child {
	border-bottom-left-radius: var(--ct-radius);
}

.inforconts .page3_content_m table tr:last-child td:last-child {
	border-bottom-right-radius: var(--ct-radius);
}


/* 表头：紫色背景 + 白字，滚动时吸附到视口顶部 */
.inforconts .page3_content_m table tr:first-child td {
	position: sticky;            /* 长表滚动时锁住列名；祖先有 overflow 时降级为普通表头 */
	top: var(--ct-th-top);
	z-index: 3;
	background: var(--ct-brand);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .6px;
	line-height: 1.4;
	text-align: center;
	white-space: nowrap;
	padding: 13px 10px;
	border: 0;
	border-bottom: 1px solid rgba(255, 255, 255, .18);
}

.inforconts .page3_content_m table tr:first-child td span,
.inforconts .page3_content_m table tr:first-child td strong {
	color: #fff;
	font-weight: 600;
}

.inforconts .page3_content_m table tr:first-child td:first-child {
	border-top-left-radius: var(--ct-radius);
}

.inforconts .page3_content_m table tr:first-child td:last-child {
	border-top-right-radius: var(--ct-radius);
}


/* 窄容器（≤720px）：表格转卡片列表，竞赛名称提到首位当标题。
   阈值选 720 是为了确保 768px 起的平板保持表格布局，字体大小与 PC 一致。 */
@container (max-width: 720px) {

	.inforconts .page3_content_m table {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		border: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		background: transparent !important;
		margin: 14px 0 6px;
		font-size: 14px;
	}

	.inforconts .page3_content_m table colgroup,
	.inforconts .page3_content_m table tr:first-child {
		display: none !important;
	}

	.inforconts .page3_content_m table tbody,
	.inforconts .page3_content_m table tr {
		display: block !important;
	}

	/* 卡片用纵向 flex，方便把「竞赛名称」提到最前面当标题 */
	.inforconts .page3_content_m table tr {
		position: relative;
		display: flex !important;
		flex-direction: column;
		background: #fff;
		border: 1px solid var(--ct-line);
		border-radius: var(--ct-radius);
		padding: 12px 14px 10px;
		margin: 0 0 10px;
		box-shadow: 0 1px 6px rgba(97, 64, 189, .06);
	}

	.inforconts .page3_content_m table tr:hover {
		background: #fff;
	}

	.inforconts .page3_content_m table td {
		display: flex !important;
		align-items: baseline;
		width: auto !important;
		padding: 3px 0;
		border: 0;
		background: transparent !important;
		text-align: left !important;
		font-size: 14px;
		font-weight: 400;
		line-height: 1.5;
		word-break: normal;
		overflow-wrap: anywhere;
	}

	/* 列名标签：伪元素补出来，正文 HTML 无需改动 */
	.inforconts .page3_content_m table td::before {
		flex: 0 0 4.6em;
		margin-right: 6px;
		color: var(--ct-muted);
		font-size: 13px;
		font-weight: 400;
	}

	.inforconts .page3_content_m table td:nth-child(1)::before { content: "序号"; }
	.inforconts .page3_content_m table td:nth-child(2)::before { content: "类别"; }
	.inforconts .page3_content_m table td:nth-child(3)::before { content: "竞赛名称"; }
	.inforconts .page3_content_m table td:nth-child(4)::before { content: "参赛级别"; }
	.inforconts .page3_content_m table td:nth-child(5)::before { content: "承办单位"; }
	.inforconts .page3_content_m table td:nth-child(6)::before { content: "负责人"; }

	/* 竞赛名称 = 卡片标题，提到首位，不显示列名标签 */
	.inforconts .page3_content_m table td:nth-child(3) {
		order: 1;
		padding: 0 46px 6px 0;
		font-size: 15px;
		font-weight: 500;
		color: var(--ct-text-strong);
		line-height: 1.45;
	}

	.inforconts .page3_content_m table td:nth-child(3)::before {
		content: none;
	}

	/* 其余各列按 类别 / 参赛级别 / 承办单位 / 负责人 顺序排在标题之下 */
	.inforconts .page3_content_m table td:nth-child(2) { order: 2; }
	.inforconts .page3_content_m table td:nth-child(4) { order: 3; }
	.inforconts .page3_content_m table td:nth-child(5) { order: 4; }
	.inforconts .page3_content_m table td:nth-child(6) { order: 5; }

	/* 序号移到卡片右上角，与正文不争空间 */
	.inforconts .page3_content_m table td:nth-child(1) {
		position: absolute;
		top: 13px;
		right: 14px;
		display: block !important;
		padding: 0 !important;
		text-align: right !important;
		font-size: 12px;
		color: #B9B3CE;
	}

	.inforconts .page3_content_m table td:nth-child(1)::before {
		content: "No.";
		flex: none;
		margin-right: 1px;
		font-size: 11px;
		color: #C8C3DA;
	}

	.inforconts .page3_content_m table td:nth-child(4) {
		flex-wrap: wrap;
	}

	.inforconts .page3_content_m table tr:last-child {
		margin-bottom: 0;
	}
}


/* 可选增强：类别徽章 / 参赛级别标签（需配合 js/content-table-enhance.js 使用）。
   纯装饰，信息本身仍是文字，不依赖颜色传达。 */
.inforconts .page3_content_m .ct-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 22px;
	height: 22px;
	padding: 0 7px;
	border-radius: 6px;
	background: var(--ct-brand);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
}

.inforconts .page3_content_m .ct-chip--A { background: #7F12AD; }
.inforconts .page3_content_m .ct-chip--C { background: #0073A9; }
.inforconts .page3_content_m .ct-chip--D { background: #6E7280; }

.inforconts .page3_content_m .ct-lv {
	display: inline-block;
	padding: 1px 7px;
	margin: 1px 4px 1px 0;
	border: 1px solid #E3DAF6;
	border-radius: 4px;
	background: var(--ct-brand-soft);
	color: #5A3CB3;
	font-size: 12px;
	line-height: 1.5;
	white-space: nowrap;
}

.inforconts .page3_content_m .ct-lv--2 {
	background: #E8F3FA;
	border-color: #D3E7F3;
	color: #00618F;
}

.inforconts .page3_content_m .ct-lv--3 {
	background: #FFF0EA;
	border-color: #F8DCD1;
	color: #A63A16;
}


/* 打印：去掉底色与阴影，换成清晰的黑白表格 */
@media print {

	.inforconts .page3_content_m table {
		box-shadow: none;
		font-size: 11px;
	}

	.inforconts .page3_content_m table tr:first-child td {
		position: static;
		background: #fff !important;
		color: #000 !important;
		border-bottom: 1.5px solid #000;
	}

	.inforconts .page3_content_m table td {
		padding: 4px 6px;
		background: #fff !important;
		border-bottom: 1px solid #999;
	}
}


/* 老浏览器兜底（不支持容器查询，如 IE / 旧版 Safari）：
   退化为固定最小宽度 + 横向滚动，保持表格结构，绝不挤成一坨。 */
@supports not (container-type: inline-size) {

	@media (max-width: 720px) {

		.inforconts {
			overflow-x: auto !important;
		}

		.inforconts .page3_content_m table {
			display: table !important;
			min-width: 720px !important;
			max-width: none !important;
			font-size: 13px !important;
		}
	}
}
