/* 心宿二 官网 · 基于 tofour 设计规范 */
:root {
  --bg: #F5F6F7; --surface: #FAFAFA; --input: #FFFFFF; --band: #12161C; --on-band: #F2F4F7; --on-band-muted: #A7AFBA;
  --text-primary: #222222; --text-secondary: #5F6670; --text-tertiary: #8C929B;
  --border: #E5E5E5; --border-hover: #D9D9D9; --border-strong: #CDD1D6; --border-disabled: #EBEBEB; --grid-dot: #D5D9DE; --icon: #65758B;
  --primary: #3878D8; --primary-hover: #4A89E5; --primary-pressed: #2E68C2; --primary-disabled: #B8CBE5; --primary-soft: #EAF2FF; --on-primary: #FFFFFF; --link: #2E68C2;
  --success: #67C56A; --success-soft: #EAF7ED; --success-text: #2E7D3A; --warning: #F0AD4E; --warning-soft: #FFF5E3; --warning-text: #985A00;
  --danger: #E57373; --danger-strong: #C9443F; --danger-soft: #FDECEC; --danger-text: #B83B3B;
  --font-sans: -apple-system, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --font-display: "SF Pro Display", -apple-system, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, "PingFang SC", monospace;
  --space-xs: 4px; --space-sm: 8px; --space-md: 12px; --space-lg: 16px; --space-xl: 24px; --space-xxl: 32px; --space-3xl: 48px; --space-4xl: 64px; --space-5xl: 96px;
  --radius-tag: 4px; --radius-input: 6px; --radius-button: 6px; --radius-image: 6px; --radius-card: 8px; --radius-popover: 8px; --radius-card-lg: 10px; --radius-modal: 12px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06); --shadow-hover: 0 2px 6px rgba(0,0,0,0.08); --shadow-modal: 0 4px 12px rgba(0,0,0,0.12);
  --shadow-input: inset 0 1px 2px rgba(0,0,0,0.04); --shadow-button: 0 1px 2px rgba(0,0,0,0.08); --shadow-pressed: inset 0 1px 2px rgba(0,0,0,0.12); --shadow-focus: 0 0 0 3px rgba(56,120,216,0.25);
  --indicator-width: 2px; --control-sm: 28px; --control-md: 32px; --control-lg: 36px; --sitenav-height: 56px; --container-width: 1200px;
  --corner-smooth: superellipse(1.5); --corner-smooth-scale: 1.25;
  --hh-ink: #0A0A0A; --hh-side: #8C929B;
  --hh-fade: rgba(255, 255, 255, 0.97); --hh-fade-0: rgba(255, 255, 255, 0);
  /* 候选框演示：取自 心宿输入法 的默认外观（白色候选框）；夜间用它设置里的深色候选框 #2B2F36 */
  --ime-panel: #FFFFFF; --ime-border: #E5E5E5; --ime-text: #222222; --ime-label: #A3A3A3; --ime-shadow: rgba(0, 0, 0, 0.14); --ime-hi: #3878D8;
  color-scheme: light;
}
:root[data-theme="dark"] {
    --bg: #0F1216; --surface: #161A20; --input: #1C2129; --band: #1F2632;
    --text-primary: #E8EAED; --text-secondary: #A2A9B3; --text-tertiary: #6F7782;
    --border: #2A3038; --border-hover: #363D47; --border-strong: #3A424D; --border-disabled: #252A31; --grid-dot: #2A3038; --icon: #8E9AAD;
    --primary-disabled: #2A3A52; --primary-soft: #172A45; --link: #7AA8EE;
    --success-soft: #15291A; --success-text: #6FCF7A; --warning-soft: #2E2410; --warning-text: #F0B860; --danger-soft: #331A1A; --danger-text: #F08A8A;
    --shadow-card: 0 1px 3px rgba(0,0,0,0.40); --shadow-hover: 0 2px 6px rgba(0,0,0,0.45); --shadow-modal: 0 4px 12px rgba(0,0,0,0.55);
    --shadow-input: inset 0 1px 2px rgba(0,0,0,0.30); --shadow-button: 0 1px 2px rgba(0,0,0,0.40); --shadow-pressed: inset 0 1px 2px rgba(0,0,0,0.45); --shadow-focus: 0 0 0 3px rgba(56,120,216,0.45);
    --hh-ink: #F2F4F7; --hh-side: #4A525E;
    --hh-fade: rgba(28, 33, 41, 0.97); --hh-fade-0: rgba(28, 33, 41, 0);
    --ime-panel: #2B2F36; --ime-border: #3A3F46; --ime-text: #F2F2F2; --ime-label: #8A8F98; --ime-shadow: rgba(0, 0, 0, 0.40);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1216; --surface: #161A20; --input: #1C2129; --band: #1F2632;
    --text-primary: #E8EAED; --text-secondary: #A2A9B3; --text-tertiary: #6F7782;
    --border: #2A3038; --border-hover: #363D47; --border-strong: #3A424D; --border-disabled: #252A31; --grid-dot: #2A3038; --icon: #8E9AAD;
    --primary-disabled: #2A3A52; --primary-soft: #172A45; --link: #7AA8EE;
    --success-soft: #15291A; --success-text: #6FCF7A; --warning-soft: #2E2410; --warning-text: #F0B860; --danger-soft: #331A1A; --danger-text: #F08A8A;
    --shadow-card: 0 1px 3px rgba(0,0,0,0.40); --shadow-hover: 0 2px 6px rgba(0,0,0,0.45); --shadow-modal: 0 4px 12px rgba(0,0,0,0.55);
    --shadow-input: inset 0 1px 2px rgba(0,0,0,0.30); --shadow-button: 0 1px 2px rgba(0,0,0,0.40); --shadow-pressed: inset 0 1px 2px rgba(0,0,0,0.45); --shadow-focus: 0 0 0 3px rgba(56,120,216,0.45);
    --hh-ink: #F2F4F7; --hh-side: #4A525E;
    --hh-fade: rgba(28, 33, 41, 0.97); --hh-fade-0: rgba(28, 33, 41, 0);
    --ime-panel: #2B2F36; --ime-border: #3A3F46; --ime-text: #F2F2F2; --ime-label: #8A8F98; --ime-shadow: rgba(0, 0, 0, 0.40);
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) img.hh-icon-b { display: none !important; }
  :root:not([data-theme="light"]) img.hh-icon-w { display: block !important; }
}
:root[data-theme="dark"] img.hh-icon-b { display: none !important; }
:root[data-theme="dark"] img.hh-icon-w { display: block !important; }
:root[data-theme="light"] { color-scheme: light; }

html { scroll-behavior: smooth; background: var(--bg); overscroll-behavior: none; }
body { margin: 0; background: var(--bg); overscroll-behavior: none; }
a { color: var(--link); }
a:hover { color: var(--primary-pressed); }
.tf-btn { text-decoration: none; }
.tf-btn:hover { color: inherit; }
.tf-btn-primary:hover { color: var(--on-primary); }
.hh-mono { font-family: var(--font-mono); letter-spacing: .08em; }
.hh-container { position: relative; width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px; box-sizing: border-box; }
.hh-h2 { margin: 12px 0 0; font-family: var(--font-display); font-size: 40px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
.hh-h2-xl { margin: 12px 0 16px; font-size: 56px; line-height: 1.1; letter-spacing: -0.025em; }
.hh-eyebrow-row { display: flex; align-items: center; gap: 12px; }
.hh-eyebrow-zh { font-size: 12px; font-weight: 500; letter-spacing: .08em; color: var(--text-secondary); }
.hh-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hh-actions, .hh-links { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }

/* ---------- 开场：3D 文字 logo ---------- */
.hh-intro { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.hh-intro[hidden] { display: none; }
.hh-intro-bg { position: absolute; inset: 0; background: #000; }
.hh-word { position: relative; width: clamp(220px, 34vw, 440px); will-change: transform, opacity; opacity: 0; }
.hh-word img { display: block; width: 100%; height: auto; }
/* 开场：笔画由左至右写出——用带柔边的遮罩从左向右推开 */
.hh-word { -webkit-mask-image: linear-gradient(90deg, #000 0 46%, transparent 54% 100%); mask-image: linear-gradient(90deg, #000 0 46%, transparent 54% 100%);
  -webkit-mask-size: 230% 100%; mask-size: 230% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: 100% 0; mask-position: 100% 0; opacity: 1; }
/* 开场进行时先藏起导航 logo，结束后由脚本挤入 */
.is-intro .hh-logo { opacity: 0; }

/* ---------- 顶部 ---------- */
.hh-nav { position: fixed; top: 16px; left: 24px; right: 24px; z-index: 40; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.hh-nav > * { pointer-events: auto; }
.hh-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.hh-logo-icon img { height: 26px; width: auto; }
.hh-logo-en img { height: 28px; width: auto; }
.hh-logo-en img.hh-icon-b { display: block; }
.hh-logo-en img.hh-icon-w { display: none; }
.hh-logo-icon img.hh-icon-b { display: block; }
.hh-logo-icon img.hh-icon-w { display: none; }
/* 产品菜单对齐整排入口的右边，不会伸出窗口、被滚动条挡住 */
.hh-chips { position: relative; display: flex; gap: 8px; align-items: flex-start; }
.hh-menu-wrap { position: static; }
.hh-chip { font: inherit; font-size: 14px; font-weight: 500; height: 36px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; box-sizing: border-box;
  background: var(--input); color: var(--text-primary); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-hover);
  text-decoration: none; white-space: nowrap; cursor: pointer; transition: border-color .12s var(--tf-ease-standard), background-color .12s var(--tf-ease-standard); }
.hh-chip:hover { border-color: var(--border-hover); background: var(--surface); color: var(--text-primary); }
.hh-chip:active { transform: translateY(1px); box-shadow: var(--shadow-pressed); transition-duration: .06s; }
.hh-chip:focus-visible { outline: none; border-color: var(--primary); box-shadow: var(--shadow-focus); }
.hh-chip.is-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.hh-chip.is-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.hh-chip[aria-expanded="true"] { border-color: var(--primary); }
.hh-chip .tf-ico { width: 14px; height: 14px; color: var(--icon); transition: transform .16s var(--tf-ease-standard); }
.hh-chip[aria-expanded="true"] .tf-ico { transform: rotate(180deg); }
.hh-chip.is-primary .tf-ico { color: inherit; }
.hh-chip.is-primary[aria-expanded="true"] { background: var(--primary-pressed); border-color: var(--primary-pressed); }
.hh-menu { position: absolute; top: 44px; right: 0; width: min(320px, calc(100vw - 48px)); padding: 4px; background: var(--input); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-hover); animation: hh-pop .16s var(--tf-ease-enter); transform-origin: top right; }
.hh-menu[hidden] { display: none; }
.hh-menu-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 4px; text-decoration: none; color: var(--text-primary); }
.hh-menu-item:hover, .hh-menu-item:focus-visible { background: var(--bg); color: var(--text-primary); outline: none; }
.hh-menu-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.hh-menu-name small { font-size: 12px; color: var(--text-secondary); }
.hh-menu-icon { width: 32px; height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 6px; background: var(--input); box-shadow: var(--shadow-button); color: var(--primary); }
.hh-menu-icon.is-muted { color: var(--icon); }
.hh-menu-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 10px; margin-bottom: 4px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--icon); cursor: text; }
.hh-menu-search:focus-within { border-color: var(--primary); box-shadow: var(--shadow-focus); background: var(--input); }
.hh-menu-search .tf-ico { width: 14px; height: 14px; flex: none; }
.hh-menu-search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 14px; color: var(--text-primary); }
.hh-menu-search input::placeholder { color: var(--text-tertiary); }
.hh-menu-search input::-webkit-search-cancel-button { display: none; }
.hh-kbd { flex: none; min-width: 18px; height: 18px; padding: 0 4px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 4px; background: var(--input); font-family: var(--font-mono); font-size: 11px; color: var(--text-tertiary); }
.hh-menu-item[hidden], .hh-menu-empty[hidden] { display: none; }
/* 产品菜单的「应用 / 引擎」分类 */
.hh-menu-tabs { display: flex; gap: 2px; padding: 3px; margin-bottom: 4px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.hh-menu-tabs button { flex: 1; height: 28px; padding: 0 8px; border: 0; border-radius: 4px; background: transparent; font: inherit; font-size: 13px; font-weight: 500; color: var(--text-secondary); cursor: pointer; }
.hh-menu-tabs button:hover { color: var(--text-primary); }
.hh-menu-tabs button[aria-selected="true"] { background: var(--input); color: var(--text-primary); box-shadow: var(--shadow-button); }
.hh-menu-tabs button:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.hh-menu-foot[hidden] { display: none; }
.hh-menu-empty { margin: 0; padding: 16px 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 13px; color: var(--text-secondary); }
@media (pointer: coarse), (max-width: 760px) { .hh-kbd { display: none; } }
.hh-menu-foot { display: flex; align-items: center; justify-content: space-between; padding: 8px; margin-top: 4px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-secondary); }
@supports (corner-shape: superellipse(1.5)) {
  .hh-chip, .hh-menu { corner-shape: var(--corner-smooth); border-radius: calc(8px * var(--corner-smooth-scale)); }
  .hh-menu-icon { corner-shape: var(--corner-smooth); border-radius: calc(6px * var(--corner-smooth-scale)); }
  .hh-card, .hh-window, .hh-eng-card { corner-shape: var(--corner-smooth); border-radius: calc(10px * var(--corner-smooth-scale)); }
}
@keyframes hh-pop { from { opacity: 0; transform: translateY(4px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- 点阵背景（鼠标驱动） ---------- */
.hh-dotfield { position: absolute; inset: 0; overflow: hidden; pointer-events: none; contain: strict; }
/* 点阵向下淡出：用一层静态渐变盖住，而不是给整块区域加遮罩（遮罩会让整屏每帧重新合成） */
.hh-dotfield::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, var(--hh-fieldbg-0) 0%, var(--hh-fieldbg-0) 25%, var(--hh-fieldbg) 100%); }
.hh-stage .hh-dotfield { --hh-fieldbg: var(--input); --hh-fieldbg-0: color-mix(in srgb, var(--input) 0%, transparent); }
.hh-hstage .hh-dotfield { --hh-fieldbg: var(--bg); --hh-fieldbg-0: color-mix(in srgb, var(--bg) 0%, transparent); }
.hh-dotbase { position: absolute; inset: -24px; background-image: radial-gradient(var(--grid-dot) 1.5px, transparent 1.6px); background-size: 24px 24px; will-change: transform; }
.hh-spot { position: absolute; left: 0; top: 0; width: 360px; height: 360px; overflow: hidden; opacity: 0; will-change: transform, opacity;
  -webkit-mask-image: radial-gradient(circle at center, #000 0%, rgba(0,0,0,.55) 38%, transparent 70%); mask-image: radial-gradient(circle at center, #000 0%, rgba(0,0,0,.55) 38%, transparent 70%); }
.hh-spot-dots { position: absolute; left: 0; top: 0; width: 384px; height: 384px; background-image: radial-gradient(var(--primary) 2.2px, transparent 2.5px); background-size: 24px 24px; will-change: transform; }
.hh-dots::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(var(--grid-dot) 1.5px, transparent 1.6px); background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(to bottom, #000 20%, transparent 100%); mask-image: linear-gradient(to bottom, #000 20%, transparent 100%); pointer-events: none; }

/* ---------- 01 最新产品：滚动进度驱动 ---------- */
.hh-scene { position: relative; height: 320vh; background: var(--input); }
.hh-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; align-items: center; box-sizing: border-box; padding: 88px 32px 48px; }
.hh-stage-inner { position: relative; width: 100%; max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.hh-col-text { flex: 1 1 380px; min-width: 0; }
.hh-col-shot { flex: 1 1 480px; min-width: 0; }
.hh-col-text .hh-tags { margin-bottom: 32px; }
.hh-caps { margin: 0 0 32px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; border-left: 1px solid var(--border-strong); }
.hh-caps li { padding-left: 16px; }
.hh-cap-num { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; color: var(--link); }
.hh-cap-t { font-size: 16px; font-weight: 600; }
.hh-cap-b { color: var(--text-secondary); }
.hh-window { background: var(--input); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-modal); overflow: hidden; transform-origin: 50% 100%; }
.hh-js .hh-window { will-change: transform; }
.hh-window-bar { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-secondary); }
.hh-window-bar .tf-ico { color: var(--icon); }
.hh-window-body { padding: 32px 32px 128px; font-size: 16px; line-height: 1.8; position: relative; }
.hh-line { position: relative; height: 29px; }
.hh-line-text { position: absolute; left: 0; top: 0; white-space: nowrap; }
/* 组字串：输入法把拼音直接写在文字里，用程序自己的字体和颜色，加一条实线下划线 */
.hh-pinyin { position: absolute; left: 32px; top: 0; text-decoration: underline 1px; text-underline-offset: 4px; white-space: nowrap;
  display: inline-block; opacity: 0; }
/* 候选框：照 心宿输入法 的默认外观画（见 HexNook-IME 仓库 server/candidate_painter.cpp）
   单行横排，候选框里不显示拼音；内边距 2，圆角 12，1px 描边，投影 0 2px 10px；
   选择框实色、白字，圆角 = 12 − 2，内边距上下 3、左右 6；编号字号 = 0.72 × 候选字号，与候选字间隔 4。
   --k 是整体放大倍数：--k: 1 与输入法默认 16 号字的实际尺寸相同 */
.hh-cand, .hh-bigcand { --k: 1; box-sizing: border-box; width: max-content; padding: calc(2px * var(--k)); background: var(--ime-panel); color: var(--ime-text);
  border: 1px solid var(--ime-border); border-radius: calc(12px * var(--k)); box-shadow: 0 calc(2px * var(--k)) calc(10px * var(--k)) var(--ime-shadow);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", var(--font-sans); line-height: 1.32; }
.hh-cand { position: absolute; left: 64px; top: 104px; opacity: 0; }
.hh-cand-row { display: flex; flex-wrap: nowrap; font-size: calc(16px * var(--k)); white-space: nowrap; }
.hh-cand-row span { display: flex; align-items: center; gap: calc(4px * var(--k)); padding: calc(3px * var(--k)) calc(6px * var(--k)); border-radius: calc(10px * var(--k)); }
.hh-cand-row i { font-style: normal; font-size: calc(12px * var(--k)); color: var(--ime-label); }
.hh-cand-row .is-on { background: var(--ime-hi); color: #FFFFFF; }
.hh-cand-row .is-on i { color: rgba(255, 255, 255, 0.75); }
/* 输入法用的是连续曲率圆角 */
@supports (corner-shape: superellipse(1.5)) {
  .hh-cand, .hh-bigcand { corner-shape: var(--corner-smooth); border-radius: calc(12px * var(--k) * var(--corner-smooth-scale)); }
  .hh-cand-row span { corner-shape: var(--corner-smooth); border-radius: calc(10px * var(--k) * var(--corner-smooth-scale)); }
}
.hh-progress { position: absolute; left: 32px; right: 32px; bottom: 24px; height: 2px; background: var(--border); max-width: 1200px; margin: 0 auto; }
.hh-progress i { position: absolute; inset: 0; background: var(--primary); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- 02 所有产品：滚动驱动横移 ---------- */
.hh-hscene { position: relative; height: 280vh; background: var(--bg); border-top: 1px solid var(--border-strong); }
.hh-hstage { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 40px; box-sizing: border-box; padding: 88px 0 56px; }
.hh-track { position: relative; display: flex; gap: 32px; padding-left: max(32px, calc((100vw - 1200px) / 2)); }
.hh-js .hh-track, .hh-js .hh-card-img-inner { will-change: transform; }
.hh-card { position: relative; flex: none; width: min(960px, 82vw); height: min(56vh, 520px); border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-card); }
.hh-card-img { position: absolute; top: 0; bottom: 0; right: 0; left: 28%; overflow: hidden; background: var(--bg); }
.hh-card-img-inner { position: absolute; inset: 0 -6% 0 0; }
.hh-center { display: flex; align-items: center; justify-content: center; }
.hh-ph { margin-left: 20%; padding: 16px 24px; border: 1px dashed var(--border-strong); border-radius: 6px; font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary); }
.hh-bigcand { --k: 1.5; position: absolute; right: 12%; top: 50%; transform: translateY(-50%); max-width: 80%; overflow: hidden; }
/* 横移的最后一张：通往「所有产品」页 */
.hh-card-all { width: min(440px, 72vw); display: flex; flex-direction: column; justify-content: space-between; box-sizing: border-box; padding: 48px; text-decoration: none; color: var(--text-primary); background: var(--input);
  transition: border-color .16s var(--tf-ease-standard), box-shadow .16s var(--tf-ease-standard); }
.hh-card-all:hover { border-color: var(--primary); box-shadow: var(--shadow-modal); color: var(--text-primary); }
.hh-card-all:focus-visible { outline: none; border-color: var(--primary); box-shadow: var(--shadow-focus); }
.hh-card-all-grid { display: grid; grid-template-columns: repeat(2, 40px); gap: 8px; }
.hh-card-all-grid i { width: 40px; height: 40px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px dashed var(--border-strong); opacity: .5; }
.hh-card-all-grid i:first-child { border: 1px solid var(--border); background: var(--input); box-shadow: var(--shadow-button); color: var(--primary); opacity: 1; }
.hh-card-all-grid i.is-next { color: var(--icon); opacity: 1; }
.hh-card-all-grid .tf-ico { width: 18px; height: 18px; }
.hh-card-all-text { display: flex; flex-direction: column; gap: 12px; }
.hh-card-all-title { font-family: var(--font-display); font-size: 32px; font-weight: 700; line-height: 1.2; }
.hh-card-all-body { color: var(--text-secondary); max-width: 30em; }
/* 箭头：标题后面一根细长箭头，跟文字同色；悬停时向右推一点、变成主色 */
.hh-card-all-title { display: inline-flex; align-items: center; gap: 16px; }
.hh-card-all-go { flex: none; width: 44px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .2s var(--tf-ease-standard), color .2s var(--tf-ease-standard); }
.hh-card-all:hover .hh-card-all-go, .hh-card-all:focus-visible .hh-card-all-go { transform: translateX(6px); color: var(--primary); }
.hh-card-text { position: absolute; left: 0; top: 0; bottom: 0; width: 58%; box-sizing: border-box; padding: 48px; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px;
  background: linear-gradient(to right, var(--hh-fade) 0%, var(--hh-fade) 45%, var(--hh-fade-0) 100%); }
.hh-card-kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; color: var(--text-secondary); }
.hh-card-text h3 { margin: 0; font-family: var(--font-display); font-size: 32px; line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; }
.hh-card-text p { margin: 0; color: var(--text-secondary); max-width: 26em; }
.hh-card-text .hh-links { margin-top: 4px; }
.hh-hprogress { position: absolute; left: max(32px, calc((100vw - 1200px) / 2)); right: max(32px, calc((100vw - 1200px) / 2)); bottom: 24px; height: 2px; background: var(--border); }
.hh-hprogress i { position: absolute; inset: 0; background: var(--primary); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- 03 关于 / 页脚 ---------- */
.hh-section { padding: 96px 32px; }
/* 首页「引擎」：两张卡片，详情见 /engines/ */
.hh-eng-inner { max-width: 1200px; margin: 0 auto; }
.hh-eng-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.hh-eng-lead { margin: 12px 0 0; font-size: 16px; color: var(--text-secondary); }
.hh-eng-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.hh-eng-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 28px; border: 1px solid var(--border); border-radius: 10px; background: var(--input); box-shadow: var(--shadow-button); color: var(--text-primary); text-decoration: none;
  transition: border-color .12s var(--tf-ease-standard); }
.hh-eng-card:hover { border-color: var(--border-hover); color: var(--text-primary); }
.hh-eng-card:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.hh-eng-card .hh-menu-icon { margin-bottom: 8px; }
.hh-eng-name { font-size: 22px; font-weight: 600; line-height: 1.3; }
.hh-eng-desc { font-size: 14px; line-height: 1.75; color: var(--text-secondary); }
.hh-eng-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: auto; padding-top: 8px; }
.hh-eng-uses { font-size: 13px; color: var(--text-tertiary); }
.hh-foot { background: var(--bg); padding: 64px 32px 32px; font-size: 12px; color: var(--text-secondary); }
.hh-foot-inner { max-width: 1200px; margin: 0 auto; }
.hh-foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 32px; padding-bottom: 48px; border-bottom: 1px solid var(--border); }
.hh-foot-cols div { display: flex; flex-direction: column; gap: 8px; }
.hh-foot-cols b { font-weight: 600; color: var(--text-primary); }
.hh-foot a { color: var(--text-secondary); text-decoration: none; }
.hh-foot a:hover { color: var(--text-primary); }
.hh-foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; }

/* 静态模式（减少动态效果） */
.hh-static .hh-scene, .hh-static .hh-hscene { height: auto; }
.hh-static .hh-stage, .hh-static .hh-hstage { position: relative; height: auto; min-height: 100vh; }
.hh-static .hh-track { flex-wrap: wrap; padding-right: 32px; }
.hh-static .hh-progress, .hh-static .hh-hprogress { display: none; }

@keyframes hh-reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@supports (animation-timeline: view()) {
  .hh-reveal { animation: hh-reveal cubic-bezier(0.1, 0.8, 0.25, 1) both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hh-reveal, .hh-menu { animation: none; }
  .hh-chip, .hh-chip .tf-ico { transition: none; }
}

/* 移动端 */
@media (max-width: 760px) {
  .hh-nav { left: 16px; right: 16px; top: 12px; }
  .hh-hide-sm { display: none !important; }
  .hh-menu { width: min(320px, calc(100vw - 32px)); }
  .hh-stage { padding: 72px 16px 40px; }
  .hh-stage-inner { gap: 24px; }
  .hh-h2 { font-size: 32px; }
  .hh-h2-xl { font-size: 36px; }
  .hh-section { padding: 64px 16px; }
  .hh-eng-grid { grid-template-columns: 1fr; margin-top: 28px; }
  .hh-eng-card { padding: 22px; }
  .hh-container { padding: 0 16px; }
  .hh-card { height: min(64vh, 520px); }
  .hh-card-img { left: 0; }
  .hh-card-all { padding: 24px; }
  .hh-card-all-go { width: 36px; }
  .hh-card-all-title { font-size: 26px; }
  .hh-card-text { width: 100%; padding: 24px; background: linear-gradient(to top, var(--hh-fade) 0%, var(--hh-fade) 45%, var(--hh-fade-0) 100%); }
  .hh-window-body { padding: 24px 20px 120px; font-size: 15px; }
  .hh-cand { left: 20px; }
  .hh-cand .hh-cand-row span:nth-child(n+5) { display: none; }
}

/* 窄屏手机：logo 文字和入口按钮略收，保证一行放下 */
@media (max-width: 400px) {
  .hh-logo { gap: 8px; }
  .hh-logo-icon img { height: 22px; }
  .hh-logo-en img { height: 24px; }
  .hh-chips { gap: 6px; }
  .hh-chip { padding: 0 10px; }
}

/* ---------- 夜间切换 ---------- */
.hh-theme { width: 36px; padding: 0; justify-content: center; }
.hh-theme .tf-ico { width: 16px; height: 16px; color: var(--text-primary); transition: none; }
.hh-theme .hh-moon { display: none; }
:root[data-theme="dark"] .hh-theme .hh-sun { display: none; }
:root[data-theme="dark"] .hh-theme .hh-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hh-theme .hh-sun { display: none; }
  :root:not([data-theme="light"]) .hh-theme .hh-moon { display: block; }
}
.is-intro .hh-theme { opacity: 0; }

/* ---------- 顶部模糊：一层背景模糊 + 从上往下淡出的遮罩，保证 logo 与导航可读 ---------- */
.hh-topblur { position: fixed; left: 0; right: 0; top: 0; height: 76px; z-index: 39; pointer-events: none;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  background: linear-gradient(to bottom, var(--hh-veil) 0%, var(--hh-veil-0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 100%); mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 100%); }
:root { --hh-veil: rgba(255, 255, 255, 0.6); --hh-veil-0: rgba(255, 255, 255, 0.15); }
:root[data-theme="dark"] { --hh-veil: rgba(15, 18, 22, 0.62); --hh-veil-0: rgba(15, 18, 22, 0.15); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --hh-veil: rgba(15, 18, 22, 0.62); --hh-veil-0: rgba(15, 18, 22, 0.15); } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --hh-veil: rgba(255, 255, 255, 0.92); --hh-veil-0: rgba(255, 255, 255, 0.4); }
}
.is-intro .hh-topblur { display: none; }
@media (max-width: 760px) { .hh-topblur { height: 64px; } }

