/* ==========================================================================
   科创研学社 · 首帧关键样式 v1（2026-11-18）
   作用：消除"旧界面闪现"（FOUC）。完整皮肤 voca-skin-v1.css 为赢得级联
   加载在页面末尾，导致首帧短暂呈现旧配色。本文件放在 <head> 最前，
   用 html:root / html body 的特异性顺序无关地压过旧层，使第一帧即为
   Voca 配色；数值与最终皮肤完全一致，不产生二次切换。
   ========================================================================== */

html:root {
    --voca-bg: #F4F1E8;
    --voca-bg-alt: #EFEBDD;
    --voca-card: #FFFFFF;
    --voca-green: #1F4D3C;
    --voca-green-dark: #16382B;
    --voca-ink: #1D2B22;
    --voca-muted: #5D6B60;
    --voca-line: #E3DFD0;
    --voca-sage: #E9EEE4;
    --voca-sage-deep: #9DB4A4;
    --voca-amber: #C08A3E;
    --voca-serif: "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
    --voca-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    /* 旧层变量（learning-site / ui.css / 站点内联 / workspace）映射 */
    --learn-ink: #1D2B22;
    --learn-muted: #5D6B60;
    --learn-blue: #1F4D3C;
    --learn-line: #E3DFD0;
    --learn-bg: #F4F1E8;
    --ui-ink: #1D2B22;
    --ui-muted: #5D6B60;
    --ui-brand: #1F4D3C;
    --ui-deep: #16382B;
    --ui-teal: #2F6B52;
    --ui-accent: #C08A3E;
    --ui-line: #E3DFD0;
    --ui-soft: #E9EEE4;
    --ink: #1D2B22;
    --muted: #5D6B60;
    --brand: #1F4D3C;
    --brand-dark: #16382B;
    --accent: #C08A3E;
    --line: #E3DFD0;
    --paper: #FFFFFF;
    --wash: #F4F1E8;
    --soft: #E9EEE4;
    --green: #1F4D3C;
    --deep: #16382B;
    --mint: #E9EEE4;
    --bg: #F4F1E8;
}

html body {
    background: #F4F1E8;
    color: #1D2B22;
}
h1, h2, h3 {
    font-family: var(--voca-serif);
    letter-spacing: 0;
}

/* 首帧即压制旧层最显眼的 hardcoded 蓝/渐变（镜像 :is() 参数以压过 (0,3,1)） */
html body :is(.hero.home-hero, .page-heading.public-listing-heading.module-hero-heading, .feelink-hero) {
    background: #F4F1E8;
}
/* 镜像 public-heroes-v2 的 (0,4,1) 规则（html 前缀提特异性），
   覆盖首帧会露出的蓝字 / 藏青标题 / 渐变按钮 */
html body :is(.hero.home-hero, .page-heading.public-listing-heading.module-hero-heading, .feelink-hero) .eyebrow {
    color: #5D6B60;
}
html body :is(.hero.home-hero, .page-heading.public-listing-heading.module-hero-heading, .feelink-hero) h1 {
    color: #1D2B22;
    letter-spacing: 0;
}
html body :is(.hero.home-hero, .page-heading.public-listing-heading.module-hero-heading, .feelink-hero) .hero-copy {
    color: #5D6B60;
}
html body :is(.hero.home-hero, .page-heading.public-listing-heading.module-hero-heading, .feelink-hero) .actions .button {
    background: #1F4D3C;
    border-color: #1F4D3C;
    color: #fff;
}
html body .hero:after {
    display: none;
    background: none;
}
html body .button {
    background: #1F4D3C;
    border-color: #1F4D3C;
    color: #fff;
}
html body > .ui-header {
    background: rgba(244, 241, 232, .92);
    border-bottom: 1px solid #E3DFD0;
}
html body > .ui-header::before,
html body > .ui-header::after {
    display: none;
}
html body .ui-header .ui-nav {
    background: #FFFFFF;
}
html body .ui-header .ui-cta {
    background: #1F4D3C;
}

/* 首帧布局中和：旧层会把首页 hero 排成两栏并画出深蓝图形面板，
   皮肤加载后才会隐藏/居中 —— 必须在首帧就压掉，否则出现明显的布局闪动 */
html body .home-hero .knowledge-graph {
    display: none;
}
html body .home-hero > .hero-layout {
    display: block;
    max-width: 880px;
    margin-inline: auto;
    text-align: center;
}
html body .home-hero .actions {
    justify-content: center;
}
html body .module-hero-visual {
    display: none;
}
html body > .ui-footer {
    background: #F4F1E8;
    border-top: 1px solid #E3DFD0;
}
html body .ui-header .ui-nav-link.active {
    background: #E9EEE4;
    color: #16382B;
}
html body .home-module:nth-child(n) .home-module-icon {
    background: #E9EEE4;
    color: #1F4D3C;
}
