/*!
 * 主页扩展 —— 网址导航前台样式
 *
 * 颜色、圆角、列数等可配置项全部由模板注入的 CSS 变量驱动（见 library/Data::themeStyle()），
 * 这里只定义结构与主题差异，换主题不需要改这份文件。
 *
 * 变量清单：
 *   --hp-primary / --hp-primary-rgb  主色与其中间色（拼 rgba 用，避免 color-mix）
 *   --hp-radius / --hp-cols          圆角、卡片列数
 *   --hp-bg / --hp-bg-soft           页面底色
 *   --hp-surface / --hp-surface-2    卡片/输入框底色
 *   --hp-text / --hp-muted           正文与次要文字
 *   --hp-border / --hp-shadow        描边与阴影
 *   --hp-chip                        标签底色
 *   --hp-hero-text / --hp-blur       标题区文字色、玻璃主题的模糊半径
 */

*, *::before, *::after { box-sizing: border-box; }

body.hp {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--hp-bg);
    color: var(--hp-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.hp a { color: inherit; text-decoration: none; }
body.hp img { border: 0; }
body.hp em { font-style: normal; }
body.hp a:focus-visible,
body.hp button:focus-visible,
body.hp input:focus-visible { outline: 2px solid var(--hp-primary); outline-offset: 2px; }

/* ---------------------------------------------------------------- 背景装饰 */
.hp-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.hp-bg span {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .5;
}
.hp-bg-1 {
    width: 420px; height: 420px;
    top: -160px; left: -80px;
    background: rgba(var(--hp-primary-rgb), .45);
}
.hp-bg-2 {
    width: 460px; height: 460px;
    top: -200px; right: -120px;
    background: rgba(var(--hp-primary-rgb), .28);
}
body.bg-plain .hp-bg { display: none; }
body.theme-dark .hp-bg span { opacity: .35; }
body.theme-paper .hp-bg span { opacity: .28; }

.hp-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* ---------------------------------------------------------------- 顶部导航 */
.hp-header {
    position: relative;
    z-index: 20;
    padding: 14px 0;
    border-bottom: 1px solid transparent;
}
body.nav-sticky .hp-header {
    position: sticky;
    top: 0;
    background: var(--hp-surface);
    backdrop-filter: var(--hp-blur, saturate(180%) blur(12px));
    -webkit-backdrop-filter: var(--hp-blur, saturate(180%) blur(12px));
    border-bottom-color: var(--hp-border);
}
body.theme-glass.nav-sticky .hp-header { background: var(--hp-surface-2); }
.hp-header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
}

.hp-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: var(--hp-hero-text, var(--hp-text));
    flex: 0 0 auto;
}
.hp-brand-logo { width: 30px; height: 30px; object-fit: contain; border-radius: 8px; }
.hp-brand-mark {
    width: 30px; height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--hp-primary), rgba(var(--hp-primary-rgb), .68));
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}
.hp-brand-name { white-space: nowrap; }

.hp-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}
.hp-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--hp-muted);
    font-weight: 500;
    white-space: nowrap;
    transition: background .18s ease, color .18s ease;
}
.hp-nav-link i { font-size: 13px; }
.hp-nav-link:hover { background: var(--hp-chip); color: var(--hp-text); }
.hp-nav-link.is-active { background: rgba(var(--hp-primary-rgb), .12); color: var(--hp-primary); }

/* margin-left:auto 负责把右侧按钮顶到最右边：
   桌面端导航栏占满中间空间时它不起作用，窄屏下导航栏变成绝对定位的抽屉（脱离 flex 流），
   它才真正生效——所以两个断点可以共用同一条规则。 */
.hp-header-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; margin-left: auto; }
.hp-ghost-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--hp-border);
    color: var(--hp-muted);
    font-weight: 500;
    transition: all .18s ease;
}
.hp-ghost-btn:hover { color: var(--hp-primary); border-color: rgba(var(--hp-primary-rgb), .45); }
.hp-icon-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border: 1px solid var(--hp-border);
    border-radius: 12px;
    background: transparent;
    color: var(--hp-text);
    cursor: pointer;
    font-size: 15px;
}

/* ---------------------------------------------------------------- 标题区 */
.hp-main { flex: 1 0 auto; position: relative; z-index: 1; }

/* 标题区要盖住下面的内容区：搜索框的引擎下拉菜单是绝对定位的，
   而两个 .hp-container 都是 z-index:1 的层叠上下文，后出现的卡片区会盖住菜单 */
.hp-hero { position: relative; z-index: 5; padding: 46px 0 34px; }
.hp-hero.has-image .hp-hero-inner {
    position: relative;
    padding: 40px 24px 46px;
    border-radius: calc(var(--hp-radius) + 8px);
    background-image: linear-gradient(180deg, rgba(9, 14, 26, .72), rgba(9, 14, 26, .82)), var(--hero-image);
    background-size: cover;
    background-position: center;
    box-shadow: var(--hp-shadow);
}
.hp-hero.has-image .hp-hero-title,
.hp-hero.has-image .hp-hero-sub { color: #fff; }
.hp-hero-inner { text-align: center; }

.hp-hero-title {
    margin: 0 0 10px;
    font-size: 36px;
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -.025em;
    color: var(--hp-hero-text, var(--hp-text));
}
.hp-hero-sub {
    margin: 0 0 26px;
    color: var(--hp-muted);
    font-size: 15px;
}

/* 搜索区 */
.hp-search { max-width: 680px; margin: 0 auto; }
.hp-engines {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}
.hp-engine {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border: 1px solid var(--hp-border);
    border-radius: 999px;
    background: var(--hp-surface);
    color: var(--hp-muted);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all .18s ease;
}
.hp-engine img { width: 16px; height: 16px; object-fit: contain; }
.hp-engine-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--engine-color, var(--hp-primary));
    box-shadow: 0 0 0 3px rgba(var(--hp-primary-rgb), .12);
}
.hp-engine:hover { color: var(--hp-text); border-color: rgba(var(--hp-primary-rgb), .4); }
.hp-engine.is-active {
    background: rgba(var(--hp-primary-rgb), .12);
    border-color: rgba(var(--hp-primary-rgb), .5);
    color: var(--hp-primary);
    font-weight: 600;
}

/* 下拉选择模式：引擎选择器嵌在搜索框最左侧。
   菜单是自己渲染的（不是原生 select 的弹层），左右留白与文字居中完全由下面的规则控制，
   不会出现浏览器原生弹层那种「左边空隙比右边大」的问题。 */
/* 框内的 18px 左内边距原本是留给放大镜图标的，下拉模式下没有图标，
   那块空白会让选择器看起来「左侧偏大」，所以这里单独收掉，让左右留白相等 */
.hp-search-box.has-picker { padding-left: 4px; }
.hp-engine-picker {
    position: relative;
    flex: 0 0 auto;
    margin-right: 8px;
    padding-right: 4px;
    border-right: 1px solid var(--hp-border);
}
.hp-engine-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;              /* 左右对称留白 */
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--hp-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
}
.hp-engine-toggle:hover { background: var(--hp-chip); color: var(--hp-primary); }
.hp-engine-toggle .fa { font-size: 12px; color: var(--hp-muted); transition: transform .18s ease; }
.hp-engine-picker.is-open .hp-engine-toggle { color: var(--hp-primary); }
.hp-engine-picker.is-open .hp-engine-toggle .fa { transform: rotate(180deg); }

.hp-engine-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: -6px;
    z-index: 30;
    min-width: calc(100% + 12px);
    padding: 6px;
    border: 1px solid var(--hp-border);
    border-radius: 12px;
    background: var(--hp-surface);
    box-shadow: var(--hp-shadow);
    backdrop-filter: var(--hp-blur, none);
    -webkit-backdrop-filter: var(--hp-blur, none);
}
/* 与 hp-md-toolbar 同样的坑：类选择器里的 display 会盖掉 [hidden] */
.hp-engine-menu[hidden] { display: none !important; }
.hp-engine-option {
    display: block;
    width: 100%;
    padding: 7px 16px;              /* 左右对称：文字两侧留白相等 */
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--hp-text);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;             /* 文字居中 */
    white-space: nowrap;
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
}
.hp-engine-option:hover,
.hp-engine-option:focus-visible { background: var(--hp-chip); outline: none; }
.hp-engine-option.is-selected { background: rgba(var(--hp-primary-rgb), .12); color: var(--hp-primary); font-weight: 600; }

.hp-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 9px 9px 20px;
    border: 1px solid var(--hp-border);
    border-radius: calc(var(--hp-radius) + 12px);
    background: var(--hp-surface);
    box-shadow: var(--hp-shadow);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.hp-search-box:focus-within {
    border-color: rgba(var(--hp-primary-rgb), .55);
    box-shadow: 0 10px 30px rgba(var(--hp-primary-rgb), .18);
}
.hp-search-icon { color: var(--hp-muted); font-size: 15px; }
.hp-search-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--hp-text);
    font-size: 16px;
    font-family: inherit;
    line-height: 38px;
    outline: none;
}
.hp-search-kbd {
    flex: 0 0 auto;
    margin-right: 2px;
    padding: 1px 8px;
    border: 1px solid var(--hp-border);
    border-bottom-width: 2px;
    border-radius: 7px;
    background: var(--hp-surface-2);
    color: var(--hp-muted);
    font-family: inherit;
    font-size: 12.5px;
    line-height: 1.6;
    transition: opacity .15s ease;
}
.hp-search-box:focus-within .hp-search-kbd { opacity: 0; }
@media (max-width: 720px) { .hp-search-kbd { display: none; } }
.hp-search-input::placeholder { color: var(--hp-muted); opacity: .8; }
.hp-search-btn {
    flex: 0 0 auto;
    padding: 0 26px;
    height: 42px;
    border: 0;
    border-radius: calc(var(--hp-radius) + 5px);
    background: var(--hp-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: filter .18s ease, transform .18s ease;
}
.hp-search-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }

.hp-hotwords {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--hp-muted);
}
.hp-hotwords-label { opacity: .75; }
.hp-hotwords a {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--hp-chip);
    color: var(--hp-muted);
    transition: all .18s ease;
}
.hp-hotwords a:hover { background: rgba(var(--hp-primary-rgb), .14); color: var(--hp-primary); }

/* ---------------------------------------------------------------- 正文布局 */
.hp-links { padding: 6px 0 44px; }
.hp-layout { display: grid; grid-template-columns: 1fr; gap: 26px; }
body.cats-sidebar .hp-layout { grid-template-columns: 208px 1fr; }

.hp-sidebar-inner {
    position: sticky;
    top: 82px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 12px;
    border: 1px solid var(--hp-border);
    border-radius: var(--hp-radius);
    background: var(--hp-surface);
}
.hp-sidebar-title {
    padding: 0 10px 8px;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--hp-muted);
}
.hp-side-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--hp-muted);
    font-weight: 500;
    transition: all .16s ease;
}
.hp-side-link i { width: 16px; text-align: center; }
.hp-side-link span { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-side-link em { font-size: 12px; opacity: .7; }
.hp-side-link:hover { background: var(--hp-chip); color: var(--hp-text); }
.hp-side-link.is-active { background: rgba(var(--hp-primary-rgb), .12); color: var(--hp-primary); }
.hp-side-top {
    margin-top: 8px;
    padding: 8px 10px;
    border-top: 1px solid var(--hp-border);
    color: var(--hp-muted);
    font-size: 13px;
}
.hp-side-top:hover { color: var(--hp-primary); }

.hp-links-main { min-width: 0; }

/* 分类快捷标签 */
.hp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}
.hp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--hp-border);
    background: var(--hp-surface);
    color: var(--hp-muted);
    font-size: 13px;
    transition: all .18s ease;
}
.hp-chip i { font-size: 12px; opacity: .85; }
.hp-chip:hover { color: var(--hp-primary); border-color: rgba(var(--hp-primary-rgb), .45); transform: translateY(-1px); }
.hp-chip.is-active { background: rgba(var(--hp-primary-rgb), .12); border-color: rgba(var(--hp-primary-rgb), .5); color: var(--hp-primary); font-weight: 600; }

/* 分组 */
.hp-group { margin-bottom: 30px; scroll-margin-top: 86px; }
.hp-group-head { margin-bottom: 14px; }
.hp-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 17px;
    font-weight: 650;
}
.hp-group-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 10px;
    background: rgba(var(--group-rgb, var(--hp-primary-rgb)), .14);
    color: var(--group-color);
    font-size: 14px;
}
.hp-group-icon i { color: var(--group-color); }
.hp-group-count {
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--hp-chip);
    color: var(--hp-muted);
    font-size: 12px;
    font-weight: 500;
}
.hp-group-intro { margin: 6px 0 0; color: var(--hp-muted); font-size: 13px; }

/* 卡片 */
.hp-cards {
    display: grid;
    grid-template-columns: repeat(var(--hp-cols, 4), minmax(0, 1fr));
    gap: 12px;
}
.hp-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid var(--hp-border);
    border-radius: var(--hp-radius);
    background: var(--hp-surface);
    backdrop-filter: var(--hp-blur, none);
    -webkit-backdrop-filter: var(--hp-blur, none);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.hp-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--hp-primary-rgb), .4);
    box-shadow: var(--hp-shadow);
}
.hp-card-icon {
    position: relative;
    flex: 0 0 auto;
    width: 40px; height: 40px;
    border-radius: 11px;
    overflow: hidden;
    background: rgba(var(--icon-rgb, var(--hp-primary-rgb)), .12);
}
.hp-card-letter {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--icon-color, var(--hp-primary));
    background: rgba(0, 0, 0, .01);
}
.hp-card-icon img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}
.hp-card-body { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.hp-card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hp-card-desc {
    font-size: 12px;
    color: var(--hp-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
a.hp-card > .hp-card-body { flex: 1 1 auto; }

/* 紧凑宫格 */
body.cards-compact .hp-cards { grid-template-columns: repeat(calc(var(--hp-cols, 4) + 2), minmax(0, 1fr)); }
body.cards-compact .hp-card {
    flex-direction: column;
    gap: 8px;
    padding: 16px 8px;
    text-align: center;
}
body.cards-compact .hp-card-body { align-items: center; width: 100%; }
body.cards-compact .hp-card-title { font-size: 13px; width: 100%; }
body.cards-compact .hp-card-desc { display: none; }

/* 列表行 */
body.cards-list .hp-cards { grid-template-columns: 1fr; gap: 8px; }
body.cards-list .hp-card { padding: 11px 16px; }
body.cards-list .hp-card-icon { width: 34px; height: 34px; border-radius: 9px; }
body.cards-list .hp-card-body { flex-direction: row; align-items: baseline; gap: 10px; }
body.cards-list .hp-card-title { min-width: 120px; }
body.cards-list .hp-card-desc { flex: 1 1 auto; }

/* 空状态 */
.hp-empty {
    padding: 60px 24px;
    border: 1px dashed var(--hp-border);
    border-radius: var(--hp-radius);
    background: var(--hp-surface);
    text-align: center;
}
.hp-empty-icon {
    width: 56px; height: 56px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(var(--hp-primary-rgb), .12);
    color: var(--hp-primary);
    font-size: 22px;
}
.hp-empty h3 { margin: 0 0 6px; font-size: 16px; }
.hp-empty p { margin: 0; color: var(--hp-muted); font-size: 13px; }

/* ---------------------------------------------------------------- 子页面 */
.hp-page-head { padding: 34px 0 10px; }
.hp-crumb { display: flex; align-items: center; gap: 8px; color: var(--hp-muted); font-size: 13px; margin-bottom: 10px; }
.hp-crumb a:hover { color: var(--hp-primary); }
.hp-crumb-sep { opacity: .5; }
.hp-page-title { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: -.3px; }
.hp-page-desc { margin: 0; color: var(--hp-muted); }
.hp-page-body { padding: 12px 0 56px; }

.hp-article {
    padding: 30px 32px;
    border: 1px solid var(--hp-border);
    border-radius: var(--hp-radius);
    background: var(--hp-surface);
    box-shadow: var(--hp-shadow);
    font-size: 15px;
    line-height: 1.85;
    max-width: 860px;
}
.hp-article h1, .hp-article h2, .hp-article h3, .hp-article h4 { margin: 1.4em 0 .6em; line-height: 1.35; }
.hp-article h1:first-child, .hp-article h2:first-child, .hp-article h3:first-child { margin-top: 0; }
.hp-article h2 { font-size: 20px; }
.hp-article h3 { font-size: 17px; }
.hp-article p { margin: 0 0 1em; }
.hp-article a { color: var(--hp-primary); border-bottom: 1px solid rgba(var(--hp-primary-rgb), .35); }
.hp-article a:hover { border-bottom-color: var(--hp-primary); }
.hp-article img { max-width: 100%; height: auto; border-radius: 10px; }
.hp-article ul, .hp-article ol { padding-left: 1.4em; margin: 0 0 1em; }
.hp-article li { margin: .3em 0; }
.hp-article blockquote {
    margin: 1em 0;
    padding: 10px 18px;
    border-left: 3px solid rgba(var(--hp-primary-rgb), .5);
    background: var(--hp-surface-2);
    border-radius: 0 10px 10px 0;
    color: var(--hp-muted);
}
.hp-article code {
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--hp-chip);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .92em;
}
.hp-article pre {
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--hp-surface-2);
    border: 1px solid var(--hp-border);
    overflow: auto;
}
.hp-article pre code { background: none; padding: 0; }
.hp-article table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.hp-article th, .hp-article td { padding: 8px 12px; border: 1px solid var(--hp-border); text-align: left; }
.hp-article th { background: var(--hp-surface-2); font-weight: 600; }

.hp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 999px;
    border: 1px solid var(--hp-border);
    font-weight: 600;
    cursor: pointer;
    transition: all .18s ease;
}
.hp-btn-primary { background: var(--hp-primary); color: #fff; border-color: transparent; }
.hp-btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.hp-empty .hp-btn { margin-top: 16px; }

/* ---------------------------------------------------------------- 页脚 */
.hp-footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding: 22px 0 30px;
    border-top: 1px solid var(--hp-border);
    color: var(--hp-muted);
    font-size: 13px;
    text-align: center;
}
.hp-footer-text { margin: 0 0 6px; }
.hp-footer-copy { margin: 0; }
.hp-footer-copy a:hover { color: var(--hp-primary); }
.hp-footer-sep { margin: 0 6px; opacity: .5; }

.hp-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 30;
    width: 42px; height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--hp-border);
    border-radius: 14px;
    background: var(--hp-surface);
    color: var(--hp-muted);
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .2s ease;
    box-shadow: var(--hp-shadow);
}
.hp-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.hp-to-top:hover { color: var(--hp-primary); }

/* ---------------------------------------------------------------- 主题微调 */
body.theme-dark .hp-brand-mark { box-shadow: 0 6px 18px rgba(var(--hp-primary-rgb), .35); }
body.theme-dark .hp-group-icon { background: rgba(var(--hp-primary-rgb), .16); }
body.theme-dark .hp-card-icon { background: rgba(255, 255, 255, .06); }
body.theme-glass .hp-card { box-shadow: 0 6px 20px rgba(79, 70, 229, .08); }
body.theme-paper .hp-hero-title,
body.theme-paper .hp-group-title,
body.theme-paper .hp-page-title { font-family: Georgia, "Songti SC", "SimSun", serif; }
body.theme-paper .hp-card { background: var(--hp-surface); }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1024px) {
    body { --hp-cols: 3; }
    body.cards-compact { --hp-cols: 4; }
    body.cats-sidebar .hp-layout { grid-template-columns: 176px 1fr; }
}
@media (max-width: 860px) {
    body.cats-sidebar .hp-layout { grid-template-columns: 1fr; }
    .hp-sidebar { display: none; }
    .hp-hero { padding: 30px 0 24px; }
    .hp-hero-title { font-size: 26px; }
}
@media (max-width: 720px) {
    body { --hp-cols: 2; }
    body.cards-compact { --hp-cols: 3; }
    .hp-icon-btn { display: inline-flex; }
    .hp-nav {
        position: absolute;
        top: calc(100% + 8px);
        left: 12px;
        right: 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 10px;
        border: 1px solid var(--hp-border);
        border-radius: var(--hp-radius);
        background: var(--hp-surface);
        box-shadow: var(--hp-shadow);
        display: none;
    }
    body.nav-open .hp-nav { display: flex; }
    .hp-nav-link { border-radius: 10px; }
    .hp-ghost-text { display: none; }
    .hp-ghost-btn { padding: 7px 10px; }
    .hp-engines { gap: 6px; }
    .hp-engine { padding: 5px 11px; font-size: 12px; }
}
@media (max-width: 520px) {
    .hp-container { padding: 0 14px; }
    .hp-engine-toggle { padding: 6px 8px; font-size: 13px; gap: 4px; }
    .hp-search-box.has-picker { padding-left: 3px; }
    .hp-engine-picker { margin-right: 6px; padding-right: 3px; }
    .hp-hero-sub { font-size: 13px; margin-bottom: 18px; }
    .hp-search-box { padding-left: 14px; }
    .hp-search-btn { padding: 0 16px; }
    .hp-article { padding: 22px 18px; font-size: 14px; }
    body.cards-compact { --hp-cols: 2; }
    .hp-card { padding: 11px 12px; gap: 10px; }
    .hp-card-icon { width: 34px; height: 34px; }
    body.cards-list .hp-card-body { flex-direction: column; align-items: flex-start; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
    body.hp *, body.hp *::before, body.hp *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

/* ================================================================
   以下为 1.6.0 新增：导航栏多主题、Hero 徽章开关、官网模块主题变体、拖拽排序
   ================================================================ */

/* ---------------------------------------------------------------- 导航栏主题（header_style 配置）
   五种主题 = 配色 + 布局 双重差异：
   default  默认    —— 品牌左 | 导航中 | 按钮右（跟随主题配色）
   gradient 渐变横幅 —— 主色渐变底、导航项等距铺开、品牌加大
   dark     紧凑工具栏 —— 整栏压扁（间距/字号缩小），像后台顶栏
   glass    浮岛卡片 —— 导航内容悬空为圆角浮岛，与页面留白分离
   minimal  极简下划线 —— 无胶囊背景，当前项用下划线指示，文字拉开字距 */
body.header-gradient .hp-header {
    background: linear-gradient(100deg, var(--hp-primary), rgba(var(--hp-primary-rgb), .74));
    border-bottom-color: transparent;
    padding: 18px 0;
}
body.header-gradient .hp-header-inner { gap: 26px; }
body.header-gradient .hp-brand { color: #fff; font-size: 19px; letter-spacing: .5px; }
body.header-gradient .hp-brand-mark { background: rgba(255, 255, 255, .24); color: #fff; }
body.header-gradient .hp-nav { justify-content: flex-end; gap: 22px; }
body.header-gradient .hp-nav-link { color: rgba(255, 255, 255, .85); padding: 8px 4px; border-radius: 0; position: relative; }
body.header-gradient .hp-nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transform: translateX(-50%);
    transition: width .2s ease;
}
body.header-gradient .hp-nav-link:hover { background: transparent; color: #fff; }
body.header-gradient .hp-nav-link:hover::after { width: 60%; }
body.header-gradient .hp-nav-link.is-active { background: transparent; color: #fff; font-weight: 700; }
body.header-gradient .hp-nav-link.is-active::after { width: 100%; }
body.header-gradient .hp-ghost-btn { color: rgba(255, 255, 255, .92); border-color: rgba(255, 255, 255, .4); }
body.header-gradient .hp-ghost-btn:hover { color: #fff; border-color: rgba(255, 255, 255, .75); background: rgba(255, 255, 255, .1); }
body.header-gradient .hp-icon-btn { color: #fff; border-color: rgba(255, 255, 255, .4); }

/* 紧凑工具栏：整栏压扁 */
body.header-dark .hp-header { background: #10151f; border-bottom-color: rgba(255, 255, 255, .06); padding: 8px 0; }
body.header-dark .hp-header-inner { gap: 14px; }
body.header-dark .hp-brand { color: #f0f4fb; font-size: 15px; }
body.header-dark .hp-brand-mark { width: 26px; height: 26px; border-radius: 7px; font-size: 13px; background: linear-gradient(135deg, var(--hp-primary), rgba(var(--hp-primary-rgb), .68)); color: #fff; }
body.header-dark .hp-brand-logo { width: 26px; height: 26px; }
body.header-dark .hp-nav { gap: 2px; }
body.header-dark .hp-nav-link { color: #9fb0c9; font-size: 13px; padding: 6px 10px; }
body.header-dark .hp-nav-link i { font-size: 12px; }
body.header-dark .hp-nav-link:hover { background: rgba(255, 255, 255, .07); color: #f0f4fb; }
body.header-dark .hp-nav-link.is-active { background: rgba(var(--hp-primary-rgb), .2); color: #fff; }
body.header-dark .hp-ghost-btn { color: #c3cede; border-color: rgba(255, 255, 255, .16); padding: 5px 12px; font-size: 13px; }
body.header-dark .hp-ghost-btn:hover { color: #fff; border-color: rgba(var(--hp-primary-rgb), .6); }
body.header-dark .hp-icon-btn { color: #e8eefb; border-color: rgba(255, 255, 255, .16); width: 32px; height: 32px; font-size: 13px; }

/* 浮岛卡片：导航内容悬浮为圆角卡片 */
body.header-glass .hp-header { padding: 12px 0; border-bottom: 0; background: transparent; }
body.header-glass.nav-sticky .hp-header { background: transparent; }
body.header-glass .hp-header-inner {
    padding: 10px 18px;
    border: 1px solid var(--hp-border);
    border-radius: calc(var(--hp-radius) + 8px);
    background: rgba(var(--hp-surface-rgb, 255, 255, 255), .72);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}
body.theme-dark.header-glass .hp-header-inner { background: rgba(17, 26, 43, .72); }

/* 极简下划线：无胶囊，当前项下划线指示 */
body.header-minimal .hp-header { background: transparent; border-bottom-color: var(--hp-border); }
body.header-minimal.nav-sticky .hp-header { background: var(--hp-bg); }
body.header-minimal .hp-brand { letter-spacing: 2px; font-weight: 600; }
body.header-minimal .hp-nav { justify-content: flex-start; gap: 22px; }
body.header-minimal .hp-nav-link {
    padding: 8px 2px;
    border-radius: 0;
    letter-spacing: .5px;
    font-size: 13px;
    position: relative;
    white-space: nowrap;
}
body.header-minimal .hp-nav-link:hover { background: transparent; color: var(--hp-primary); }
body.header-minimal .hp-nav-link.is-active { background: transparent; color: var(--hp-primary); font-weight: 700; }
body.header-minimal .hp-nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--hp-primary);
    transform: scaleX(0);
    transition: transform .2s ease;
}
body.header-minimal .hp-nav-link.is-active::after { transform: scaleX(1); }
body.header-minimal .hp-ghost-btn { border: 0; padding: 7px 6px; }

/* ---------------------------------------------------------------- 官网模块主题变体（模块的 theme 字段） */
/* 轮播图：文字居中 */
.st-theme-center .st-slide-text { max-width: none; text-align: center; margin: 0 auto; }
.st-theme-center .st-slide-body { text-align: center; }
.st-theme-center .st-carousel { text-align: center; }
/* 轮播图：文字沉底（遮罩改为底部向上渐变，画面上部完整露出） */
.st-theme-bottom .st-slide-mask {
    background: linear-gradient(180deg, rgba(10, 15, 28, 0) 45%, rgba(10, 15, 28, .78) 100%);
}
.st-theme-bottom.st-maskcustom .st-slide-mask {
    background: linear-gradient(180deg, rgba(var(--st-mask-rgb), 0) 45%, rgba(var(--st-mask-rgb), .8) 100%);
}
.st-theme-bottom .st-slide { align-items: flex-end; }
.st-theme-bottom .st-slide-body { padding-bottom: 64px; }

/* 特性网格：plain 去卡片化 */
.st-theme-plain .st-feature {
    border: 0;
    background: transparent;
    padding: 18px 12px;
    text-align: center;
}
.st-theme-plain .st-feature::before { display: none; }
.st-theme-plain .st-feature-icon {
    margin: 0 auto 14px;
    width: 64px;
    height: 64px;
    font-size: 26px;
    border-radius: 50%;
}
.st-theme-plain .st-feature:hover { transform: none; box-shadow: none; }

/* 图文卡片：flat 扁平化 */
.st-theme-flat .st-card { border: 0; border-radius: 0; background: var(--hp-surface-2); }
.st-theme-flat .st-card:hover { transform: none; box-shadow: none; background: var(--hp-surface); }

/* 数据统计：plain 无卡片 */
.st-theme-plain.st-stats .st-stats-row { gap: 8px; }
.st-theme-plain .st-stat {
    border: 0;
    background: transparent;
    padding: 18px 8px;
}
.st-theme-plain .st-stat:hover { transform: none; box-shadow: none; }
.st-theme-plain .st-stat-num { font-size: 40px; }

/* 行动号召：soft 浅色 */
.st-theme-soft .st-cta-inner {
    background: rgba(var(--hp-primary-rgb), .08);
    border: 1px solid rgba(var(--hp-primary-rgb), .22);
    box-shadow: none;
    color: var(--hp-text);
}
.st-theme-soft .st-cta-desc { color: var(--hp-muted); }
.st-theme-soft.st-cta.has-image .st-cta-inner {
    background-image: linear-gradient(rgba(var(--hp-primary-rgb), .1), rgba(var(--hp-primary-rgb), .1)), var(--cta-image);
    background-size: cover;
    background-position: center;
}

/* ---------------------------------------------------------------- 模块拖拽排序 */
.hp-drag-handle {
    cursor: move;
    color: #b8c2d0;
    font-size: 15px;
    padding: 4px 6px;
}
.hp-drag-handle:hover { color: var(--hp-primary, #2f6df6); }
#hp-section-table tbody tr.hp-sorting { opacity: .55; background: #fdf6e3; }
.sortable-ghost { opacity: .35; background: rgba(47, 109, 246, .08); }

/* ================================================================
   1.5.0：网址导航页美化增强 + 官网展示页模块基础样式（st- 前缀）
   ================================================================ */

/* ---------------------------------------------------------------- 导航页美化 */
::selection { background: rgba(var(--hp-primary-rgb), .25); }

/* 滚动条（WebKit 内核） */
body.hp ::-webkit-scrollbar { width: 10px; height: 10px; }
body.hp ::-webkit-scrollbar-thumb {
    background: rgba(var(--hp-primary-rgb), .28);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: content-box;
}
body.hp ::-webkit-scrollbar-thumb:hover { background-color: rgba(var(--hp-primary-rgb), .45); }
body.hp ::-webkit-scrollbar-track { background: transparent; }

/* 主标题渐变文字（浅色主题下更明显） */
.hp-hero-title {
    background: linear-gradient(120deg, var(--hp-hero-text, var(--hp-text)) 30%, var(--hp-primary) 65%, rgba(var(--hp-primary-rgb), .75));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hp-hero.has-image .hp-hero-title {
    background: none;
    -webkit-text-fill-color: currentColor;
}

/* 标题下的问候语与统计徽章 */
.hp-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: -10px 0 24px;
}
.hp-hero-sub + .hp-hero-meta { margin-top: -14px; }
.hp-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    border: 1px solid var(--hp-border);
    border-radius: 999px;
    background: var(--hp-chip);
    color: var(--hp-muted);
    font-size: 12.5px;
    font-weight: 500;
    transition: all .18s ease;
}
.hp-hero-chip i { font-size: 12px; color: var(--hp-primary); }
.hp-hero-chip:hover {
    color: var(--hp-primary);
    border-color: rgba(var(--hp-primary-rgb), .45);
    transform: translateY(-1px);
}
.hp-hero-chip-alt { color: var(--hp-primary); border-color: rgba(var(--hp-primary-rgb), .35); background: rgba(var(--hp-primary-rgb), .08); }

/* 动效纪律：工具页只保留一次入场（hero 序列），卡片不做入场动画。
   内容到达优先——卡片直接可见，动效只用于提示交互反馈。 */
@keyframes hp-hero-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}
.hp-hero-inner > * { animation: hp-hero-in .38s ease backwards; }
.hp-hero-inner > :nth-child(2) { animation-delay: .06s; }
.hp-hero-inner > :nth-child(3) { animation-delay: .12s; }
.hp-hero-inner > :nth-child(4) { animation-delay: .18s; }

/* 卡片悬停：轻反馈（描边 + 微上浮），不抢搜索框的戏 */
.hp-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--hp-primary-rgb), .45);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .07);
}
.hp-card:hover .hp-card-icon img { transform: scale(1.06); }
.hp-card-icon img { transition: transform .18s ease; }

/* 分组标题：主色渐变下划线 */
.hp-group-title { position: relative; padding-bottom: 10px; margin-bottom: 4px; }
.hp-group-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 42px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--group-color, var(--hp-primary)), rgba(var(--group-rgb, var(--hp-primary-rgb)), .15));
}

/* 分类标签与侧栏的当前态强化 */
.hp-chip.is-active {
    box-shadow: 0 6px 16px rgba(var(--hp-primary-rgb), .18);
}
.hp-side-link { position: relative; }
.hp-side-link.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    border-radius: 999px;
    background: var(--hp-primary);
}

/* 搜索引擎标签：激活时圆点发光 */
.hp-engine.is-active .hp-engine-dot { box-shadow: 0 0 0 4px rgba(var(--hp-primary-rgb), .18); }

/* 页脚：顶部渐变细线 */
.hp-footer { position: relative; }
.hp-footer::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: min(320px, 60%);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--hp-primary-rgb), .55), transparent);
}

/* ---------------------------------------------------------------- 官网展示页（st- 前缀） */
.st-page { position: relative; z-index: 1; }
.st-block { position: relative; }
.st-container { position: relative; }

/* 通用标题组 */
.st-head { max-width: 720px; margin: 0 auto 34px; text-align: center; }
.st-heading {
    margin: 0 0 10px;
    font-size: 27px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--hp-hero-text, var(--hp-text));
}
.st-sub { margin: 0; color: var(--hp-muted); font-size: 15px; }

/* 滚动进场动画：JS 给 .st-reveal 补 is-in，无 JS 时直接可见 */
@keyframes st-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}
.st-reveal { opacity: 1; }
.js-reveal .st-reveal { opacity: 0; }
.js-reveal .st-reveal.is-in { animation: st-rise .6s ease forwards; }

/* 轮播图模块 */
.st-carousel { position: relative; overflow: hidden; }
.st-carousel-track { position: relative; height: 420px; }
.st-carousel-small .st-carousel-track { height: 300px; }
.st-carousel-large .st-carousel-track { height: 560px; }
.st-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .7s ease, visibility .7s ease;
}
.st-slide.is-active { opacity: 1; visibility: visible; }
.st-slide-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 6s ease;
}
.st-slide.is-active .st-slide-img { transform: scale(1); }
/* 遮罩：让白色标题在任何图片上都清晰。
   三档样式（st-mask-*）× 三档浓淡（st-maskstrength-*）× 可选自定义色（st-maskcustom）。
   默认「左侧渐变 + 标准浓淡」= 主色从左侧淡出，与站点配色一致。 */
.st-slide-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(var(--hp-primary-rgb), .82) 8%, rgba(10, 15, 28, .55) 55%, rgba(10, 15, 28, .35));
    transition: opacity .3s ease;
}
/* 自定义遮罩颜色：把渐变的彩色部分换成配置的颜色 */
.st-maskcustom .st-slide-mask {
    background: linear-gradient(100deg, rgba(var(--st-mask-rgb), .82) 8%, rgba(var(--st-mask-rgb), .42) 60%, rgba(var(--st-mask-rgb), .2));
}
/* 整体深色：不改变画面色调，只压暗，适合彩色照片 */
.st-mask-dark .st-slide-mask {
    background: linear-gradient(180deg, rgba(8, 12, 22, .34), rgba(8, 12, 22, .62));
}
/* 不显示遮罩 */
.st-mask-none .st-slide-mask { display: none; }

/* 浓淡 */
.st-maskstrength-light .st-slide-mask { opacity: .5; }
.st-maskstrength-strong .st-slide-mask::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .32);
}
.st-slide-body { position: relative; z-index: 1; padding: 64px 20px; }
.st-slide-text { max-width: 640px; }
.st-slide-title {
    margin: 0 0 12px;
    color: #fff;
    font-size: 34px;
    line-height: 1.28;
    font-weight: 700;
    letter-spacing: -.4px;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .25);
}
.st-slide-sub {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, .88);
    font-size: 15.5px;
    line-height: 1.7;
    text-shadow: 0 1px 10px rgba(0, 0, 0, .22);
}
.st-slide.is-active .st-slide-title { animation: st-rise .7s .1s ease backwards; }
.st-slide.is-active .st-slide-sub { animation: st-rise .7s .22s ease backwards; }
.st-slide.is-active .st-slide-btn { animation: st-rise .7s .34s ease backwards; }
.st-slide-btn { border-color: transparent; }

.st-carousel-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.st-carousel-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .45);
    cursor: pointer;
    transition: all .25s ease;
}
.st-carousel-dot.is-active { width: 26px; background: #fff; }
.st-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    transition: all .2s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.st-carousel-prev { left: 18px; }
.st-carousel-next { right: 18px; }
.st-carousel:hover .st-carousel-nav { opacity: 1; }
.st-carousel-nav:hover { background: rgba(255, 255, 255, .32); }

/* 信息说明模块 */
.st-info { padding: 72px 0; }
.st-info-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
    align-items: center;
}
.st-info-left .st-info-inner { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.st-info-right .st-info-inner { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.st-info-right .st-info-media { order: 2; }
.st-info-top .st-info-inner { text-align: center; }
.st-info-top .st-head,
.st-info-top .st-info-media { max-width: 760px; margin-left: auto; margin-right: auto; }
.st-info-media {
    position: relative;
    border-radius: calc(var(--hp-radius) + 10px);
    overflow: hidden;
    box-shadow: 0 22px 44px rgba(var(--hp-primary-rgb), .16);
}
.st-info-media::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, .35);
    pointer-events: none;
}
.st-info-media img { display: block; width: 100%; height: auto; }
.st-info-desc { color: var(--hp-muted); font-size: 15px; line-height: 1.9; }
.st-info-desc h1, .st-info-desc h2, .st-info-desc h3 { color: var(--hp-text); margin: 1.2em 0 .5em; }
.st-info-desc p { margin: 0 0 .8em; }
.st-info-desc a { color: var(--hp-primary); }
.st-info-desc ul, .st-info-desc ol { padding-left: 1.4em; margin: 0 0 .8em; }
.st-info-desc img { max-width: 100%; border-radius: 10px; }
.st-info-btn { margin-top: 22px; }
.st-info .st-heading { text-align: left; background: none; -webkit-text-fill-color: currentColor; }
.st-info-top .st-info-body { text-align: center; }
.st-info-top .st-heading { text-align: center; }

/* 特性网格模块 */
.st-features, .st-cards, .st-stats, .st-gallery { padding: 72px 0; }
.st-feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.st-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.st-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.st-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.st-feature {
    position: relative;
    display: block;
    padding: 28px 24px;
    border: 1px solid var(--hp-border);
    border-radius: calc(var(--hp-radius) + 6px);
    background: var(--hp-surface);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.st-feature::before {
    content: "";
    position: absolute;
    top: -70px;
    right: -70px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(var(--item-rgb, var(--hp-primary-rgb)), .1);
    transition: transform .3s ease;
}
.st-feature:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--item-rgb, var(--hp-primary-rgb)), .5);
    box-shadow: 0 16px 34px rgba(var(--item-rgb, var(--hp-primary-rgb)), .16);
}
.st-feature:hover::before { transform: scale(1.5); }
.st-feature-icon {
    position: relative;
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(var(--item-rgb, var(--hp-primary-rgb)), .18), rgba(var(--item-rgb, var(--hp-primary-rgb)), .08));
    color: var(--item-color, var(--hp-primary));
    font-size: 22px;
    transition: all .25s ease;
}
.st-feature:hover .st-feature-icon {
    background: linear-gradient(135deg, var(--item-color, var(--hp-primary)), rgba(var(--item-rgb, var(--hp-primary-rgb)), .72));
    color: #fff;
    box-shadow: 0 10px 22px rgba(var(--item-rgb, var(--hp-primary-rgb)), .35);
}
.st-feature-title { position: relative; margin: 0 0 8px; font-size: 16px; font-weight: 650; color: var(--hp-text); }
.st-feature-desc { position: relative; margin: 0; color: var(--hp-muted); font-size: 13.5px; line-height: 1.75; }

/* 图文卡片模块 */
.st-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.st-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--hp-border);
    border-radius: calc(var(--hp-radius) + 6px);
    background: var(--hp-surface);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.st-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--item-rgb, var(--hp-primary-rgb)), .5);
    box-shadow: 0 18px 38px rgba(var(--item-rgb, var(--hp-primary-rgb)), .15);
}
.st-card-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(var(--item-rgb, var(--hp-primary-rgb)), .16), rgba(var(--item-rgb, var(--hp-primary-rgb)), .05));
    overflow: hidden;
}
.st-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.st-card:hover .st-card-cover img { transform: scale(1.05); }
.st-card-letter {
    font-size: 40px;
    font-weight: 700;
    color: var(--item-color, var(--hp-primary));
    text-shadow: 0 6px 18px rgba(var(--item-rgb, var(--hp-primary-rgb)), .35);
}
.st-card-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; flex: 1 1 auto; }
.st-card-title { margin: 0; font-size: 16px; font-weight: 650; color: var(--hp-text); }
.st-card-desc { margin: 0; color: var(--hp-muted); font-size: 13.5px; line-height: 1.7; }
.st-card-more {
    margin-top: auto;
    padding-top: 6px;
    color: var(--item-color, var(--hp-primary));
    font-size: 13px;
    font-weight: 600;
}
.st-card-more .fa { transition: transform .2s ease; }
.st-card:hover .st-card-more .fa { transform: translateX(3px); }

/* 数据统计模块 */
.st-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}
.st-stat {
    padding: 28px 16px;
    border: 1px solid var(--hp-border);
    border-radius: calc(var(--hp-radius) + 6px);
    background: var(--hp-surface);
    text-align: center;
    transition: transform .2s ease, box-shadow .2s ease;
}
.st-stat:hover { transform: translateY(-3px); box-shadow: var(--hp-shadow); }
.st-stat-num {
    font-size: 36px;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg, var(--hp-primary), rgba(var(--hp-primary-rgb), .62));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.st-stat-label { margin-top: 6px; color: var(--hp-muted); font-size: 13px; }

/* 图片墙模块 */
.st-gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.st-photo {
    position: relative;
    display: block;
    margin: 0;
    aspect-ratio: 4 / 3;
    border-radius: calc(var(--hp-radius) + 4px);
    overflow: hidden;
    background: var(--hp-surface-2);
}
.st-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.st-photo:hover img { transform: scale(1.06); }
.st-photo-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px 16px 12px;
    background: linear-gradient(transparent, rgba(8, 12, 22, .72));
    color: #fff;
    font-size: 13.5px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(6px);
    transition: all .25s ease;
}
.st-photo:hover .st-photo-caption { opacity: 1; transform: none; }

/* 富文本模块 */
.st-rich-body {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 44px;
    border: 1px solid var(--hp-border);
    border-radius: calc(var(--hp-radius) + 6px);
    background: var(--hp-surface);
    font-size: 15px;
    line-height: 1.85;
    color: var(--hp-text);
}
.st-rich-body h1, .st-rich-body h2, .st-rich-body h3 { margin: 1.3em 0 .6em; line-height: 1.35; }
.st-rich-body h1:first-child, .st-rich-body h2:first-child, .st-rich-body h3:first-child { margin-top: 0; }
.st-rich-body p { margin: 0 0 1em; }
.st-rich-body a { color: var(--hp-primary); border-bottom: 1px solid rgba(var(--hp-primary-rgb), .35); }
.st-rich-body img { max-width: 100%; height: auto; border-radius: 10px; }
.st-rich-body ul, .st-rich-body ol { padding-left: 1.4em; }
.st-rich-body blockquote {
    margin: 1em 0;
    padding: 10px 18px;
    border-left: 3px solid rgba(var(--hp-primary-rgb), .5);
    background: var(--hp-surface-2);
    border-radius: 0 10px 10px 0;
    color: var(--hp-muted);
}
.st-rich-body pre {
    padding: 14px 16px;
    border: 1px solid var(--hp-border);
    border-radius: 10px;
    background: var(--hp-surface-2);
    overflow: auto;
}
.st-rich-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.st-rich-body table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.st-rich-body th, .st-rich-body td { padding: 8px 12px; border: 1px solid var(--hp-border); }

/* 行动号召模块 */
.st-cta { padding: 26px 0 64px; }
.st-cta-inner {
    position: relative;
    padding: 54px 32px;
    border-radius: calc(var(--hp-radius) + 10px);
    background: linear-gradient(120deg, var(--hp-primary), rgba(var(--hp-primary-rgb), .72));
    color: #fff;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 22px 48px rgba(var(--hp-primary-rgb), .3);
}
.st-cta.has-image .st-cta-inner {
    background-image: linear-gradient(120deg, rgba(var(--hp-primary-rgb), .85), rgba(10, 15, 28, .72)), var(--cta-image);
    background-size: cover;
    background-position: center;
}
.st-cta-title { margin: 0 0 10px; font-size: 27px; font-weight: 700; letter-spacing: -.3px; }
.st-cta-desc { margin: 0 auto 24px; max-width: 640px; color: rgba(255, 255, 255, .88); font-size: 15px; }
.st-cta-btn { background: #fff; color: var(--hp-primary); border-color: transparent; }
.st-cta-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0, 0, 0, .2); }

/* 页脚导航模块（官网自定义的链接组） */
.st-links-footer { padding: 40px 0 26px; border-top: 1px solid var(--hp-border); }
.st-footer-desc { margin: 0 0 14px; color: var(--hp-muted); font-size: 13.5px; text-align: center; }
.st-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 22px;
}
.st-footer-links a {
    color: var(--hp-muted);
    font-size: 13.5px;
    transition: color .18s ease;
}
.st-footer-links a:hover { color: var(--hp-primary); }

/* 官网页面网格内条目的进场错峰 */
.js-reveal .st-reveal.is-in:nth-child(2) { animation-delay: .07s; }
.js-reveal .st-reveal.is-in:nth-child(3) { animation-delay: .14s; }
.js-reveal .st-reveal.is-in:nth-child(4) { animation-delay: .21s; }
.js-reveal .st-reveal.is-in:nth-child(n+5) { animation-delay: .28s; }

/* ---------------------------------------------------------------- 官网页响应式 */
@media (max-width: 900px) {
    .st-cols-3, .st-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .st-info-left .st-info-inner, .st-info-right .st-info-inner { grid-template-columns: 1fr; }
    .st-info-right .st-info-media { order: 0; }
    .st-slide-title { font-size: 26px; }
    .st-heading { font-size: 24px; }
    .st-info, .st-features, .st-cards, .st-stats, .st-gallery { padding: 44px 0; }
    .st-carousel-nav { display: none; }
    .st-rich-body { padding: 26px 22px; }
}
@media (max-width: 560px) {
    .st-cols-3, .st-cols-4 { grid-template-columns: 1fr !important; }
    .st-carousel-track { height: 300px; }
    .st-carousel-large .st-carousel-track { height: 400px; }
    .st-slide-title { font-size: 22px; }
    .st-slide-body { padding: 44px 16px; }
    .st-stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
