/* Homepage DIY cards in the copied X5 style. Loaded only on its desktop forum index. */
#diy1 .cdbao-home-hero,
#diy1 .cdbao-home-activity {
	display: grid;
	gap: 18px;
	margin: 0 0 22px !important;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}
#diy1 .cdbao-home-hero {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
#diy1 .cdbao-home-activity {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	row-gap: 12px;
}
#diy1 .cdbao-home-hero::after,
#diy1 .cdbao-home-activity::after {
	display: none;
}
#diy1 .cdbao-home-hero > .column,
#diy1 .cdbao-home-activity > .column {
	float: none;
	width: auto;
	min-width: 0;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}
#diy1 .cdbao-home-hero > .frame-title,
#diy1 .cdbao-home-activity > .frame-title {
	grid-column: 1 / -1;
	margin: 0;
	padding: 0;
	height: auto;
	line-height: 24px;
	border: 0;
	font-size: 15px;
	color: var(--dz-fc);
}
#diy1 .cdbao-home-hero .block,
#diy1 .cdbao-home-activity .block {
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 1px solid var(--dz-borderb);
	border-radius: var(--dz-radius-m, 10px);
	background: var(--dz-bgf);
	box-shadow: none;
	overflow: hidden;
}
#diy1 .cdbao-home-hero .block {
	height: 350px;
}
#diy1 .cdbao-home-activity .block {
	flex: 1;
	min-height: 350px;
}
#diy1 .cdbao-home-hero .blocktitle,
#diy1 .cdbao-home-activity .blocktitle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	box-sizing: border-box;
	height: 50px;
	margin: 0 16px;
	padding: 0;
	line-height: 24px;
	font-size: 16px;
	font-weight: 500;
	border-bottom: 1px solid var(--dz-borderb);
}
#diy1 .blocktitle .subtitle {
	float: none;
	padding: 0;
	font-size: 12px;
	font-weight: 400;
	white-space: nowrap;
}
#diy1 .cdbao-diy-list {
	padding: 8px 16px 12px;
}
#diy1 .cdbao-diy-list ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
#diy1 .cdbao-diy-list li {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 35px;
	margin: 0;
	padding: 0;
	line-height: 22px;
	border-bottom: 1px solid var(--dz-borderb);
	font-size: 14px;
}
#diy1 .cdbao-diy-list li:last-child {
	border-bottom: 0;
}
#diy1 .cdbao-diy-title {
	display: block;
	flex: 1;
	min-width: 0;
	color: var(--dz-alink);
	font-size: 14px;
	font-weight: 400;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
#diy1 .cdbao-diy-title:hover {
	color: var(--dz-ahover);
}
#diy1 .cdbao-diy-meta,
#diy1 .cdbao-diy-author {
	flex-shrink: 0;
	font-size: 12px;
	font-weight: 400;
	color: var(--dz-fc);
	white-space: nowrap;
}
#diy1 .cdbao-diy-author {
	max-width: 90px;
	text-overflow: ellipsis;
	overflow: hidden;
}
#diy1 .cdbao-diy-rank {
	flex-shrink: 0;
	width: 16px;
	text-align: center;
	font-size: 12px;
	color: var(--dz-fc);
	font-variant-numeric: tabular-nums;
}
#diy1 .cdbao-diy-list li:nth-child(-n+3) .cdbao-diy-rank {
	color: var(--dz-ahot);
	font-weight: 600;
}
/* Replace the old negative-margin fixes and 95% carousel widths. */
#diy1 #portal_block_27 .dxb_bc {
	margin: 0 !important;
}
#diy1 #portal_block_25,
#diy1 #portal_block_25 .dxb_bc,
#diy1 #portal_block_25 .slidebox,
#diy1 #portal_block_25 .slideshow,
#diy1 #portal_block_25 .slideshow li {
	box-sizing: border-box;
	width: 100% !important;
	height: 350px !important;
	margin: 0;
	padding: 0;
	border: 0;
}
#diy1 #portal_block_25 .slideshow li > a {
	display: block;
	height: 100%;
}
#diy1 #portal_block_25 .slideshow img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}
#diy1 #portal_block_25 .slideshow span.title {
	box-sizing: border-box;
	width: 100%;
	padding: 44px 20px 42px;
	font-size: 17px;
	line-height: 26px;
}
@media (max-width: 1000px) {
	#diy1 .cdbao-diy-list {
		padding-left: 12px;
		padding-right: 12px;
	}
	#diy1 .cdbao-diy-meta {
		font-size: 11px;
	}
}
@media (max-width: 760px) {
	#diy1 .cdbao-home-hero,
	#diy1 .cdbao-home-activity {
		grid-template-columns: minmax(0, 1fr);
	}
	#diy1 .cdbao-home-activity .block {
		min-height: 0;
	}
}

/* Native forum groups: retain their links, permissions and collapse controls. */
#ct .cdbao-home-forums {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
}
#ct .cdbao-home-forums > .bmw {
	margin: 0 0 24px;
	border: 0;
	background: transparent;
	box-shadow: none;
}
#ct .cdbao-home-forums > .bmw > .bm_h {
	display: flex;
	align-items: center;
	gap: 12px;
	height: auto;
	min-height: 40px;
	margin: 0 0 10px;
	padding: 0;
	line-height: 24px;
	border: 0;
	background: transparent;
}
#ct .cdbao-home-forums .bm_h h2 {
	order: -1;
	flex: 1;
	min-width: 0;
	font-size: 16px !important;
	font-weight: 500;
}
#ct .cdbao-home-forums .bm_h > .y {
	float: none;
	max-width: 60%;
	font-size: 12px;
	color: var(--dz-fc);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
#ct .cdbao-home-forums .bm_h > .o {
	order: 1;
	float: none;
	flex-shrink: 0;
}
#ct .cdbao-home-forums .bm_h .o em {
	display: block;
	margin: 0;
	font-size: 20px;
}
#ct .cdbao-home-forums > .bmw > .bm_c {
	margin: 0;
	padding: 0;
}
#ct .cdbao-home-forums .fl_tb:has(.fl_g) {
	display: block;
	width: 100%;
}
#ct .cdbao-home-forums .fl_tb:has(.fl_g) > tbody {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}
#ct .cdbao-home-forums .fl_tb:has(.fl_g) > tbody > tr {
	display: contents;
}
#ct .cdbao-home-forums .fl_tb td:empty {
	display: none;
}
#ct .cdbao-home-forums .fl_tb td.fl_g {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	box-sizing: border-box;
	width: auto;
	min-width: 0;
	min-height: 112px;
	padding: 16px;
	border: 1px solid var(--dz-borderb);
	border-radius: var(--dz-radius-m, 10px);
	background: var(--dz-bgf);
	transition: border-color .15s ease, background-color .15s ease;
}
#ct .cdbao-home-forums .fl_tb td.fl_g:hover {
	border-color: var(--dz-ahover);
	background: var(--dz-bgf);
}
/* Native column padding is structural, not an additional forum card. */
#ct .cdbao-home-forums .fl_tb td.fl_g:empty {
	display: none;
}
#ct .cdbao-home-forums .fl_icn_g {
	float: none;
	flex: 0 0 44px;
	width: 44px !important;
	min-height: 44px;
	margin: 2px 0 0;
}
#ct .cdbao-home-forums .fl_icn_g img,
#ct .cdbao-home-forums .fl_icn img {
	display: block;
	width: 44px !important;
	height: 44px !important;
	object-fit: contain;
	border-radius: var(--dz-radius-s);
}
#ct .cdbao-home-forums .fl_g dl {
	flex: 1;
	min-width: 0;
	margin: 0 !important;
	padding: 0;
}
#ct .cdbao-home-forums .fl_g dt {
	display: block;
	height: auto;
	min-height: 22px;
	margin: 0 0 3px;
	font-size: 15px;
	font-weight: 500;
	line-height: 22px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
#ct .cdbao-home-forums .fl_g dd {
	display: block;
	height: auto;
	min-height: 19px;
	font-size: 12px;
	line-height: 19px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
#ct .cdbao-home-forums .fl_g dd em:nth-child(2) {
	margin-left: 6px;
}
#ct .cdbao-home-forums .fl_g dd > a {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
}
#ct .cdbao-home-forums .fl_g dd > cite {
	display: block;
	font-size: 11px;
	color: var(--dz-fc);
	overflow: hidden;
	text-overflow: ellipsis;
}
/* Favourites now share the forum-card markup, even for a single saved forum. */
#ct .cdbao-home-forums #category_0 .fl_g {
	min-height: 112px;
}
/* Small favourites lists use the native four-cell row instead of a tile. */
#ct .cdbao-home-forums .fl_tb:not(:has(.fl_g)) {
	table-layout: fixed;
	border: 1px solid var(--dz-borderb);
	border-radius: var(--dz-radius-m, 10px);
	background: var(--dz-bgf);
}
#ct .cdbao-home-forums .fl_tb:not(:has(.fl_g)) td {
	padding: 14px 16px;
	line-height: 22px;
}
#ct .cdbao-home-forums .fl_icn {
	width: 44px !important;
	min-height: 44px;
	padding: 14px 12px 14px 16px !important;
}
#ct .cdbao-home-forums .fl_tb td h2 {
	font-size: 15px;
}
#ct .cdbao-home-forums .fl_i {
	width: 100px;
	font-size: 12px;
}
#ct .cdbao-home-forums .fl_by {
	width: 250px;
	font-size: 12px;
}
#ct .cdbao-home-forums .fl_by > div {
	width: auto;
	margin: 0;
	padding: 0;
}
@media (max-width: 1100px) {
	#ct .cdbao-home-forums .fl_tb:has(.fl_g) > tbody {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 760px) {
	#ct .cdbao-home-forums .fl_tb:has(.fl_g) > tbody {
		grid-template-columns: minmax(0, 1fr);
	}
	#ct .cdbao-home-forums .bm_h > .y {
		display: none;
	}
	#ct .cdbao-home-forums .fl_g dt {
		white-space: normal;
	}
	#ct .cdbao-home-forums .fl_tb:not(:has(.fl_g)) .fl_i,
	#ct .cdbao-home-forums .fl_tb:not(:has(.fl_g)) .fl_by {
		display: none;
	}
}

/* Statistics sit between the hero and activity cards in normal view. */
#chart.cdbao-home-stats {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px 20px;
	box-sizing: border-box;
	min-height: 44px;
	margin: 0 0 18px;
	padding: 10px 16px;
	border: 1px solid var(--dz-borderb);
	border-radius: var(--dz-radius-m, 10px);
	background: var(--dz-bgf);
	font-size: 12px;
	line-height: 22px;
}
#chart.cdbao-home-stats::after {
	display: none;
}
#chart.cdbao-home-stats .chart,
#chart.cdbao-home-stats > .y {
	float: none;
	margin: 0;
	padding: 0;
}
#chart.cdbao-home-stats .chart em {
	font-weight: 500;
}
#chart.cdbao-home-stats .pipe {
	margin: 0 8px;
	color: var(--dz-borderb);
}
#chart.cdbao-home-stats > .y {
	margin-left: auto;
	white-space: nowrap;
	font-size: 12px;
}
#chart.cdbao-home-stats a {
	color: var(--dz-fc);
}
#chart.cdbao-home-stats a:hover {
	color: var(--dz-ahover);
}

/* Compact partner links; preserve the original logos and destinations. */
#ct .cdbao-home-links {
	margin: 0 0 20px;
	border: 1px solid var(--dz-borderb);
	border-radius: var(--dz-radius-m, 10px);
	background: var(--dz-bgf);
	box-shadow: none;
}
#ct .cdbao-home-links > .bm_h {
	height: 44px;
	margin: 0 16px;
	padding: 0;
	line-height: 44px;
	border: 0;
}
#ct .cdbao-home-links .bm_h h2 {
	font-size: 15px !important;
	font-weight: 500;
}
#ct .cdbao-home-links #category_lk {
	padding: 0 16px 14px !important;
}
#ct .cdbao-home-links .m {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
}
#ct .cdbao-home-links .m::after {
	display: none;
}
#ct .cdbao-home-links .m li {
	display: flex;
	align-items: center;
	gap: 12px;
	clear: none;
	min-width: 0;
	margin: 0;
	padding: 12px;
	border: 0 !important;
	border-radius: var(--dz-radius-s, 6px);
	background: var(--dz-bgc);
}
#ct .cdbao-home-links .m img {
	display: block;
	float: none;
	flex: 0 0 88px;
	width: 88px;
	height: 34px;
	margin: 0;
	object-fit: contain;
}
#ct .cdbao-home-links .lk_content {
	float: none;
	min-width: 0;
}
#ct .cdbao-home-links .lk_content h5 {
	margin: 0 0 3px;
	font-size: 13px;
	font-weight: 500;
	line-height: 20px;
}
#ct .cdbao-home-links .lk_content p {
	font-size: 12px;
	line-height: 18px;
}
#ct .cdbao-home-links .lk_content h5,
#ct .cdbao-home-links .lk_content p {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
#ct .cdbao-home-links .x {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin: 10px 0 0;
}
#ct .cdbao-home-links .x li {
	float: none;
	margin: 0;
	font-size: 12px;
}

/* Keep the contact code and footer information in a shorter, aligned footer. */
.dz_footc {
	margin-top: 24px;
	padding: 20px 0;
	border-top: 1px solid var(--dz-borderb);
	box-shadow: none;
}
#ft.dz_footc_bottom {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 6px 24px;
	padding: 0;
}
#ft .dz_footc_dico {
	grid-column: 2;
	grid-row: 1 / span 2;
	align-self: center;
	float: none;
	padding: 0;
}
#ft .dz_footc_dico .ewmimg {
	float: none;
	width: 72px;
	margin: 0;
	font-size: 11px;
	line-height: 18px;
}
#ft .dz_footc_nav {
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 12px;
	line-height: 22px;
}
#ft .dz_footc_nav a,
#ft .dz_footc_nav .pipe {
	float: none;
	margin-right: 10px;
	font-size: 12px;
}
#ft .dz_footc_copy {
	padding: 0;
	font-size: 12px;
	line-height: 20px;
}
@media (max-width: 1100px) {
	#ct .cdbao-home-links .m {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 760px) {
	#chart.cdbao-home-stats {
		padding: 10px 12px;
	}
	#chart.cdbao-home-stats > .y {
		margin-left: 0;
	}
	#ct .cdbao-home-links .m {
		grid-template-columns: minmax(0, 1fr);
	}
	#ft.dz_footc_bottom {
		column-gap: 12px;
	}
}
