/* ============================================================
   blocksy-bridge.css — 压过父主题默认值的桥接层（必须最后加载）
   ------------------------------------------------------------
   为什么需要单独一层：
   Blocksy 把调色板和组件样式输出成 <head> 里的**内联 <style>**，
   位置在所有 enqueue 的外部 CSS 之后。同特异性下后来者赢，
   所以子主题里普通的 `:root {}` / `.ct-footer {}` 会被它盖掉。

   解决办法是**提高特异性**，不是撒 !important：
     - 调色板：`:root:root` (0,0,2) > 它的 `:root` (0,0,1)
     - 组件：  `body[data-x]` (0,2,1) > 它的 `[data-x*="..."]` (0,2,0)
   （data-header / data-footer / data-prefix / data-link 全挂在 <body> 上，
     2026-09-07 实测确认。）

   本文件全程不使用 !important。

   注：早期这里有一条 `.entries { gap: ... !important }`，是给 Blocksy 默认归档网格
   调间距用的。四个模板（home/single/archive/search）全部自己写之后，页面上已不再
   产生 `.entries`，那条成了死代码，已删。
   ============================================================ */

/* ============================================================
   1. 调色板重映射
   ------------------------------------------------------------
   Blocksy 整套设计系统都由这 8 个变量派生，改这里等于一次性
   把全站（含它自己的组件）拉到主站的近黑/纯白体系，
   比逐个组件去覆盖可靠得多。
   ============================================================ */
:root:root {
	--theme-palette-color-1: #1c1c1c;   /* 主色：主站几乎不用彩色强调，链接/按钮一律近黑 */
	--theme-palette-color-2: #000000;   /* hover */
	--theme-palette-color-3: #1c1c1c;   /* 标题 */
	--theme-palette-color-4: #1c1c1c;   /* 正文 */
	--theme-palette-color-5: #ebebeb;   /* 分隔线 */
	--theme-palette-color-6: #f6f6f6;   /* 浅色区块底 */
	--theme-palette-color-7: #ffffff;   /* 页面背景 —— 默认 #FAFBFC 的灰蓝是"不像主站"的头号原因 */
	--theme-palette-color-8: #ffffff;   /* 内容背景 */

	/* 字体族也交给子主题 token，免得 Blocksy 注入 system font 栈 */
	--theme-font-family: var(--jg-font);
	--theme-font-weight: 400;
}

/* ============================================================
   2. 列表卡片扁平化
   ------------------------------------------------------------
   主站是编辑风：靠留白和细线分隔，没有卡片底色/阴影/圆角。
   Blocksy 默认给 .entry-card 加白底+阴影，在纯白页面上会显出一个"框"。
   ============================================================ */
body[data-prefix] .entry-card {
	background: transparent;
	box-shadow: none;
	border: 0;
	border-radius: 0;
	padding: 0;
}

body[data-prefix] .entry-card .entry-title {
	font-weight: var(--jg-heading-weight);
	letter-spacing: var(--jg-heading-tracking);
	text-transform: var(--jg-heading-transform);
}

/* --- 题图：直角 + 固定比例 + 悬停缓推 ---
   主站没有圆角图片。固定 4:3 是为了让不同尺寸的原图在网格里对齐，
   否则竖图横图混排时卡片高度参差，整排看着就散。 --- */
body[data-prefix] .entry-card .ct-media-container {
	border-radius: 0;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: rgb(var(--jg-border-soft));   /* 图未加载时占位，避免布局跳动 */
	margin-bottom: 1.1em;
}
body[data-prefix] .entry-card .ct-media-container img {
	border-radius: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s cubic-bezier(.2, .6, .2, 1);
}
body[data-prefix] .entry-card:hover .ct-media-container img {
	transform: scale(1.04);
}

/* 分类标签：主站那种极小号宽字距 */
body[data-prefix] .entry-card .entry-meta,
body[data-prefix] .entry-card .ct-meta-categories {
	font-size: var(--jg-text-xs);
	letter-spacing: .12em;
	text-transform: uppercase;
	color: rgb(var(--jg-muted));
}


/* ============================================================
   3. 页头
   ============================================================ */
body[data-header] .ct-header {
	background: rgb(var(--jg-paper));
	border-bottom: 1px solid rgb(var(--jg-border-soft));
	box-shadow: none;
}

/* --- logo 图已含 JASGOOD 字样，Blocksy 默认还会再输出一遍文字站名，
       两个叠在一起是重复。图片的 alt="JASGOOD" 已经把品牌名给到读屏软件，
       所以这里直接隐藏文字站名，不影响可访问性。 --- */
body[data-header] .site-title {
	display: none;
}

/* ============================================================
   4. 页脚 —— 主站是近黑反色
   ============================================================ */
body[data-footer] .ct-footer {
	background: rgb(var(--jg-ink));
	color: rgb(var(--jg-paper));
}
body[data-footer] .ct-footer [data-row] {
	background: transparent;
	border-color: rgb(var(--jg-paper) / .16);
}
body[data-footer] .ct-footer,
body[data-footer] .ct-footer a,
body[data-footer] .ct-footer .ct-footer-copyright {
	color: rgb(var(--jg-paper) / .78);
}
body[data-footer] .ct-footer a:hover {
	color: rgb(var(--jg-paper));
	opacity: 1;
}

/* ============================================================
   5. 链接下划线动画
   ------------------------------------------------------------
   Blocksy 的 data-link="type-2" 是"下划线滑入"效果，
   主站是纯 opacity 变化，两者观感差很多。
   ============================================================ */
body[data-link] .ct-header a::before,
body[data-link] .ct-header a::after {
	display: none;
}

/* ============================================================
   6. 页脚版权样式
   ------------------------------------------------------------
   文案本身走 Blocksy 官方 filter（见 inc/customizer-bridge.php），
   这里只管观感。body[data-footer](0,2,1) 已足够压过父主题的
   [data-footer*="type-1"](0,2,0)，全文件零 !important。
   ============================================================ */
body[data-footer] .ct-footer-copyright {
	font-size: var(--jg-text-xs);
	letter-spacing: .08em;
}
