/**
 * 首页 Bento 网格（工具需求列表页顶部）
 * 字号/字重/文字色对齐 CONTEXT §9
 */

.mytheme-home-bento {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	margin-bottom: 32px;
}

.mytheme-home-bento__cell--hero {
	grid-column: span 2;
	grid-row: span 2;
	min-height: 280px;
}

.mytheme-home-bento__cell--md {
	grid-column: span 2;
	min-height: 160px;
}

.mytheme-home-bento__cell--tall {
	grid-column: span 1;
	grid-row: span 2;
	min-height: 280px;
}

.mytheme-home-bento__cell--sm {
	grid-column: span 1;
	min-height: 140px;
}

.mytheme-home-bento__cell--bar {
	grid-column: span 2;
	min-height: 72px;
}

.mytheme-home-bento__card {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: inherit;
	padding: 16px;
	border-radius: 16px;
	border: 1px solid #f3f4f6;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	text-decoration: none;
	color: #222222;
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

a.mytheme-home-bento__card:hover,
.mytheme-home-bento__card a:hover {
	text-decoration: none;
}

a.mytheme-home-bento__card:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
	border-color: rgba(224, 48, 48, 0.20);
}

.mytheme-home-bento__card:focus-visible {
	outline: 2px solid rgba(224, 48, 48, 0.25);
	outline-offset: 2px;
}

/* 栏目头：左侧品牌短状态线（每卡 1 个识别点，不高饱和铺红） */
.mytheme-home-bento__card-head {
	position: relative;
	padding-left: 10px;
	margin-bottom: 12px;
}

.mytheme-home-bento__card-head::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.35em;
	bottom: 0.35em;
	width: 3px;
	border-radius: 999px;
	background: #e03030;
}

.mytheme-home-bento__title {
	display: block;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	color: #222222;
}

.mytheme-home-bento__subtitle {
	display: block;
	margin-top: 4px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	color: #666666;
}

.mytheme-home-bento__empty {
	margin: 0;
	font-size: 14px;
	color: #999999;
}

/* 海报 */
.mytheme-home-bento__card--poster {
	position: relative;
	justify-content: flex-end;
	padding: 20px;
	background: #111111;
	border: none;
	color: #fff;
	background-size: cover;
	background-position: center;
}

.mytheme-home-bento__card--poster.has-image::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.15));
	pointer-events: none;
}

.mytheme-home-bento__poster-inner {
	position: relative;
	z-index: 1;
}

.mytheme-home-bento__card--poster .mytheme-home-bento__title {
	font-size: 24px;
	font-weight: 600;
	color: #fff;
}

.mytheme-home-bento__card--poster .mytheme-home-bento__subtitle {
	color: rgba(255, 255, 255, 0.85);
}

/* 外链条 */
.mytheme-home-bento__card--link {
	flex-direction: row;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
}

.mytheme-home-bento__link-thumb {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	object-fit: cover;
	flex-shrink: 0;
}

.mytheme-home-bento__link-text {
	min-width: 0;
}

/* 工具 / 知识库列表 */
.mytheme-home-bento__tool-list,
.mytheme-home-bento__kb-list,
.mytheme-home-bento__daily-list,
.mytheme-home-bento__article-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

.mytheme-home-bento__tool-list a,
.mytheme-home-bento__kb-list a,
.mytheme-home-bento__daily-list a,
.mytheme-home-bento__article-list a {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 6px 8px;
	border-radius: 10px;
	color: #222222;
	font-size: 15px;
	font-weight: 500;
	transition: background-color 0.15s ease;
}

.mytheme-home-bento__tool-list a:hover,
.mytheme-home-bento__kb-list a:hover,
.mytheme-home-bento__daily-list a:hover,
.mytheme-home-bento__article-list a:hover {
	background: rgba(224, 48, 48, 0.06);
	color: #e03030;
}

.mytheme-home-bento__tool-list a:hover .mytheme-home-bento__title,
.mytheme-home-bento__kb-list a:hover .mytheme-home-bento__title,
.mytheme-home-bento__article-list a:hover .mytheme-home-bento__title {
	color: #e03030;
}

/* 外链卡：标题旁暗示可点击 */
.mytheme-home-bento__card--link .mytheme-home-bento__title {
	transition: color 0.15s ease;
}

.mytheme-home-bento__card--link:hover .mytheme-home-bento__title {
	color: #e03030;
}

.mytheme-home-bento__tool-list img,
.mytheme-home-bento__kb-list img {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	object-fit: cover;
	flex-shrink: 0;
}

.mytheme-home-bento__daily-list time {
	flex-shrink: 0;
	width: 36px;
	font-size: 13px;
	font-weight: 600;
	color: #e03030;
}

.mytheme-home-bento__article-thumb {
	display: block;
	width: 56px;
	height: 40px;
	border-radius: 8px;
	overflow: hidden;
	flex-shrink: 0;
}

.mytheme-home-bento__article-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mytheme-home-bento__article-meta {
	min-width: 0;
}

.mytheme-home-bento__article-meta .mytheme-home-bento__title {
	font-size: 15px;
	font-weight: 500;
}

@media (max-width: 900px) {
	.mytheme-home-bento {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.mytheme-home-bento__cell--hero {
		grid-column: span 2;
		grid-row: span 1;
		min-height: 200px;
	}

	.mytheme-home-bento__cell--md,
	.mytheme-home-bento__cell--bar {
		grid-column: span 2;
	}

	.mytheme-home-bento__cell--tall,
	.mytheme-home-bento__cell--sm {
		grid-column: span 1;
	}

	.mytheme-home-bento__cell--tall {
		grid-row: span 2;
	}
}

@media (max-width: 560px) {
	.mytheme-home-bento {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.mytheme-home-bento__cell--hero,
	.mytheme-home-bento__cell--md,
	.mytheme-home-bento__cell--tall,
	.mytheme-home-bento__cell--sm,
	.mytheme-home-bento__cell--bar {
		grid-column: span 1;
		grid-row: span 1;
	}

	.mytheme-home-bento__card--poster .mytheme-home-bento__title {
		font-size: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mytheme-home-bento__card,
	.mytheme-home-bento__tool-list a,
	.mytheme-home-bento__kb-list a,
	.mytheme-home-bento__daily-list a,
	.mytheme-home-bento__article-list a {
		transition: none;
	}

	a.mytheme-home-bento__card:hover {
		transform: none;
	}
}
