/* ============================================================
   全站文字体系统一层（主站专用；魔典 TownSquare 不引用本文件）
   ------------------------------------------------------------
   必须作为每个页面 <head> 中「最后一个」样式表加载：
   页面级 CSS 现在排在 theme-minimal.css 之后，本层再居最后，
   同特异度规则自然胜出，无需 !important。
   ------------------------------------------------------------
   目标：字号 / 字体 / 文字色 全站收敛到统一角色令牌，
   消除「同一区块标题在不同页面 16.8/18.4/20.8/24px」这类例外。
   ============================================================ */

:root {
    /* 角色化字号：全站唯一来源。页面级 CSS 应优先引用这些令牌 */
    --fs-hero: clamp(2.25rem, 6vw, 3.25rem); /* 首页主视觉（唯一的大号展示档） */
    --fs-page-title: clamp(1.5rem, 3vw, 1.75rem); /* 页面主标题 24–28px */
    --fs-block-title: 1.125rem; /* 区块 / 卡片 / 面板标题 18px —— 全站统一 */
    --fs-subtitle: 0.9375rem; /* 副标题 15px */
    --fs-label: 0.875rem; /* 表单标签 / 常规按钮 14px */
    --fs-caption: 0.75rem; /* 说明 / 计数 / 角标 12px */
}

/* ---------- 1) 字体：全站唯一 sans 栈；等宽仅用于代码/JSON ---------- */
html,
body,
button,
input,
select,
textarea,
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
}
code,
pre,
kbd,
samp,
.mono,
textarea.mono,
.json-preview {
    font-family: var(--font-mono);
}

/* ---------- 2) 正文：统一 16px + 主文字色 ---------- */
body {
    font-size: var(--fs-base);
    color: var(--ink);
}

/* ---------- 3) 区块级标题：全站一档（18px / 600 / 强调色） ----------
   覆盖此前各页各自为政的实现：
   find-edition 的 .input-group h2（浏览器默认 24px）、role-search 的
   .input-group h3（clamp 20.8px）、.clue-title（24px）、.section-title（18.4）、
   .panel-title（16.8）、.alm-title（18.4）、.results-section h3（22.4）。 */
.input-group h2,
.input-group h3,
.section-title,
.panel-title,
.alm-title,
.results-section h3,
.rs-card > h3,
.sij-card > .section-title,
.card-title,
.clue-block-title,
.clue-ov-title,
.clue-quick-title {
    font-size: var(--fs-block-title);
    font-weight: 600;
    line-height: 1.4;
    color: var(--primary-text);
}

/* ---------- 4) 页面主标题：唯一更大的档位 ---------- */
.page-title {
    font-size: var(--fs-page-title);
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary-text);
}

/* 首页功能卡标题：同样归入区块标题档（theme-minimal 里带 html[data-theme] 前缀，此处镜像其特异度） */
.hero-card-title,
html[data-theme="light"] .hero-card-title,
html[data-theme="dark"] .hero-card-title {
    font-size: var(--fs-block-title);
    font-weight: 600;
    line-height: 1.4;
    color: var(--primary-text);
}

/* ---------- 5) 副标题 / 计数 / 说明：统一 12px + 次要色 ---------- */
.header .subtitle,
.subtitle,
.counter,
.fe-hint,
.result-meta {
    font-size: var(--fs-caption);
    color: var(--dim);
}

small {
    font-size: var(--fs-caption);
}

/* ---------- 6) 图标：JS 注册表注入 SVG（见 assets/js/icons.js） ---------- */
.ico {
    display: inline-flex;
    width: 1.15em;
    height: 1.15em;
    align-items: center;
    justify-content: center;
    vertical-align: -0.15em;
    flex: 0 0 auto;
    color: currentColor;
}
.ico svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
/* 方形图标按钮内的图标略大一点 */
.icon-btn .ico {
    width: 18px;
    height: 18px;
}
/* 空状态大图标：保持块级 + 居中（原 .jt-empty__icon 是 font-size 驱动） */
.ico.jt-empty__icon {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
