/*
 * 导入型 GEO 文章的站点适配层，只作用于 .geo-article 容器内部。
 * 由 blog_details_html.php 在文章自带样式之后加载。
 *
 * 文件分两段，两段的特异性策略是相反的，改动时注意区分：
 *
 *   一、还原被站点 reset 抹掉的浏览器默认  —— 用 :where() 把特异性降到 0，
 *       文章自己的任何一条规则都能盖过它。
 *   二、站点侧的统一约束            —— 正常特异性 + 加载在后，会盖过文章。
 */

/* ===========================================================================
 * 一、还原浏览器默认
 *
 * GEO 交付件是按「整页就是这篇文章」写的，标题粗体、strong 加粗、列表项目符号、
 * em 斜体、链接下划线这些都直接吃浏览器默认，交付件的 CSS 里不会再写一遍。
 * 而站点的 base.css 有一套全局 reset 会把它们全部抹掉：
 *
 *     h1,h2,h3,h4,h5,h6,b,strong { font-weight: normal; }
 *     li  { list-style-type: none; }
 *     i,em{ font-style: normal; }
 *     a   { text-decoration: none; }
 *     *   { margin:0; padding:0; }
 *
 * 实测后果：文章里所有标题和 strong 的字重都是 400（正文里的重点全部失效）、
 * 列表没有项目符号。这不是交付件的问题，是我们的 reset 漏进了文章。
 *
 * 用 :where() 包住容器，让这些规则的特异性等同于裸标签选择器：
 * 既能盖过同为裸标签的 base.css（因为加载在后），又会输给文章里任何
 * 带类名的规则——交付件如果真的想要某个标题不加粗，它写的规则依然生效。
 * ======================================================================== */

:where(.geo-article) h1,
:where(.geo-article) h2,
:where(.geo-article) h3,
:where(.geo-article) h4,
:where(.geo-article) h5,
:where(.geo-article) h6,
:where(.geo-article) b,
:where(.geo-article) strong,
:where(.geo-article) th {
    font-weight: 700;
}

:where(.geo-article) i,
:where(.geo-article) em {
    font-style: italic;
}

:where(.geo-article) ul li { list-style-type: disc; }
:where(.geo-article) ol li { list-style-type: decimal; }

/* base.css 的 *{padding:0} 会把列表缩进也清掉，项目符号跟着跑到容器外面 */
:where(.geo-article) ul,
:where(.geo-article) ol {
    padding-left: 1.6em;
}

:where(.geo-article) a {
    text-decoration: underline;
}

/* ===========================================================================
 * 二、站点侧的统一约束
 *
 * 交付件的标题按整页设计，放进站点的正文栏里偏大。这里统一收一档。
 * 这一段用正常特异性且加载在文章样式之后，会盖过交付件的设定——
 * 也就是说改这里会影响所有导入型文章。某一篇要例外，就在后台
 * 「博客编辑 → 样式」里用更高特异性的选择器覆盖（如 article.geo-article h1）。
 * ======================================================================== */

.geo-article h1 {
    font-size: clamp(28px, 4vw, 40px);
}
