@charset "UTF-8";

/* home.css —— 官网主页（/）专属样式。
   页面族第 6 个文件；通用件（按钮 / 表单件 / toast）仍在 base.css，本文件只放营销页排版。
   依赖 base.css 的设计变量（--primary / --text / --border / --card / --shadow-* / --radius），
   base.css 必须最先加载。
   ⚠ 改本文件 → bump home.html 里的 home.css?v=。 */

/* ===== 容器与通用件 ===== */
/* ⚠ base.css 里有 `html, body { height: 100% }`（应用页需要满屏分割）。
   在官网这种长文档页上，它会把 body 的高度钉成一个视口高 → sticky 头部的「粘贴范围」
   只到第一个视口就结束（实测：滚到 1547px 时头部已跑到屏幕上方 -647px）。
   这里只对首页放开高度，不动 base.css（避免牵动其他页面的 ?v=）。 */
body.home {
  height: auto;
  min-height: 100%;
}

/* 锚点跳转要为 sticky 头部（60px）让位，否则标题会被压在导航下面 */
html {
  scroll-padding-top: 76px;
}

.h-wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 首页自己的按钮：不用 base.css 的 .btn-primary —— 那个是表单里的 100% 宽按钮 */
.h-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.h-btn-primary {
  background: var(--primary);
  color: #fff;
}

.h-btn-primary:hover {
  background: var(--primary-hover);
}

.h-btn-ghost {
  color: var(--text-secondary);
}

.h-btn-ghost:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.h-btn-ghost {
  color: var(--text-secondary);
}

.h-btn-lg {
  padding: 12px 22px;
  font-size: 15px;
  border-radius: 10px;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ===== 顶部导航 ===== */
.h-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.h-head-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 60px;
}

.h-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  flex-shrink: 0;
}

/* ⚠ 品牌文字必须整个包在一个元素里：.h-brand 是 inline-flex，直接写
   「Fig<b>Talk</b>」会让文本节点和 <b> 各自成为一个 flex item，被 gap: 9px
   撑出一个空格（2026-10-15 修，原来显示成「Fig Talk」）。 */
.h-brand-name {
  display: inline;
  white-space: nowrap;
}

.h-brand b {
  color: var(--primary);
  font-weight: 800;
}

.h-brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.h-brand-mark svg {
  width: 17px;
  height: 17px;
}

.h-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: 6px;
}

.h-nav a {
  color: var(--text-secondary);
  font-size: 14px;
  padding: 5px 0; /* 点触目标高度 ≥ 24px（a11y） */
}

.h-nav a:hover {
  color: var(--primary);
}

.h-head-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 移动端菜单：纯 CSS（details/summary，无 JS）；≤860px 显示，见文件末尾媒体查询。
   桌面端隐藏 → 不影响现有导航。 */
.h-menu {
  display: none;
  position: relative;
}

.h-menu summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  list-style: none;
}

.h-menu summary::-webkit-details-marker {
  display: none;
}

.h-menu summary:hover,
.h-menu[open] summary {
  background: var(--primary-light);
  color: var(--primary);
}

.h-menu summary svg {
  width: 20px;
  height: 20px;
}

.h-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  min-width: 176px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}

.h-menu-panel a {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.h-menu-panel a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.h-menu-panel .h-menu-cta {
  color: var(--primary);
  font-weight: 600;
}

/* ===== Hero ===== */
.h-hero {
  padding: 76px 0 68px;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.h-hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 52px;
  align-items: center;
}

.h-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 600;
}

.h-h1 {
  margin: 18px 0 14px;
  font-size: 42px;
  line-height: 1.24;
  letter-spacing: -0.6px;
}

.h-h1 em {
  font-style: normal;
  color: var(--primary);
}

.h-lead {
  margin: 0;
  max-width: 32em;
  font-size: 16px;
  color: var(--text-secondary);
}

.h-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.h-hero-note {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--text-secondary);
}

/* Hero 右侧视觉：真实界面截图（浏览器窗口外框 + 图）。
   换图时保持 1440×900 比例并重新压缩；HTML 里已写死 width/height → 不会 CLS。 */
.h-mock {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.h-mock-bar {
  display: flex;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.h-mock-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #dfe3ea;
}

.h-shot {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.h-mock-tagline {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
}

/* ===== 分区 ===== */
.h-sec {
  padding: 66px 0;
}

.h-sec-alt {
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.h-sec-head {
  max-width: 660px;
  margin: 0 auto 38px;
  text-align: center;
}

.h-h2 {
  margin: 0 0 10px;
  font-size: 27px;
  line-height: 1.35;
  letter-spacing: -0.3px;
}

.h-sec-sub {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-secondary);
}

/* 功能矩阵 */
.h-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.h-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.h-card:hover {
  border-color: #c7d2fe;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.h-ico {
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.h-ico svg {
  width: 19px;
  height: 19px;
}

.h-card h3 {
  margin: 0 0 6px;
  font-size: 15.5px;
}

.h-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* 图表能力：轮播，每页一整屏（4 列 × 3 行 = 12 张），左右整页翻；窄屏列数递减 */
.h-carousel {
  position: relative;
}

/* 没有 JS 时：直接铺成 4 列网格（28 张全部可见） */
.h-carousel:not(.is-enhanced) .h-figs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.h-car-viewport {
  overflow: hidden;
  border-radius: 12px;
  transition: height 0.32s ease;   /* 每页主题张数不同 → 高度跟随当前页，避免大块空白 */
}

.h-car-viewport:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

.h-figs {
  display: flex;
  align-items: flex-start;   /* 每页保持自身高度，供 JS 同步视口高度 */
  transition: transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

/* 一页 = 一个主题（组内 4 列自适应换行，行数不固定） */
.h-fig-page {
  flex: 0 0 100%;
}

.h-fig-page-title {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.h-fig-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-content: start;
}

.h-fig {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

/* 翻页按钮：叠在两侧。首尾相接（最后一页再往后回到第 1 页），所以两边永远可点。
   每页张数统一（4 列 × 2 行 + 卡片等高），视口高度页页相同，按钮固定垂直正中。 */
.h-car-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, opacity 0.15s;
}

.h-car-btn.prev {
  left: -18px;
}

.h-car-btn.next {
  right: -18px;
}

.h-car-btn:hover:not(:disabled) {
  color: var(--primary);
  border-color: #c7d2fe;
}

.h-car-btn svg {
  width: 16px;
  height: 16px;
}

/* 分页圆点：当前页拉长成小横条，与站内「细横杠」语言一致 */
.h-car-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.h-car-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
  transition: width 0.2s, background 0.2s;
}

.h-car-dot:hover {
  background: #94a3b8;
}

.h-car-dot[aria-current="true"] {
  width: 22px;
  background: var(--primary);
}

.h-fig:hover {
  border-color: #c7d2fe;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.h-fig-img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.h-fig-body {
  padding: 12px 14px 14px;
}

.h-fig-body h3 {
  margin: 0 0 4px;
  font-size: 14.5px;
  line-height: 1.45;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 描述固定 3 行高：描述长短不一时卡片等高，整页高度才能一致（翻页不跳） */
.h-fig-body p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  min-height: 4.8em;   /* 3 × 1.6 */
}

.h-figs-more {
  margin: 22px auto 0;
  max-width: 880px;
  text-align: center;
  /* 中文按字换行，长段容易把词劈开（实测「密度图」被断成「密 / 度图」）；
     pretty 让浏览器整体优化断行位置；不支持的浏览器退化为默认换行，无副作用 */
  text-wrap: pretty;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--text-secondary);
}

/* 能力清单（只列「能做什么」，不表达顺序或流程）：分组卡 + 标签 */
.h-cap-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 18px;
}

.h-cap-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}

.h-cap-group h3 {
  margin: 0 0 12px;
  font-size: 14.5px;
}

.h-caps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.h-caps li {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-side);
  font-size: 13px;
  color: var(--text-secondary);
}

/* 工作流 */
.h-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.h-step {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.h-step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.h-step h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.h-step p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* 常见问题（零 JS：details/summary） */
.h-faq {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.h-faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.h-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0; /* 行高 ≥ 24px（a11y） */
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 600;
  list-style: none;
}

.h-faq-item summary::-webkit-details-marker {
  display: none;
}

/* 展开指示图标：用 **纯 ASCII** 的 SVG data URI 画加/减号。
   ⚠ 不要写 content: "+" / "−" 这类非 ASCII 字符——CSS 文件若被按非 UTF-8 解码（无 BOM、
   HTTP 头无 charset 时可能发生），非 ASCII 字符会变成乱码（历史踩坑：展开后加号乱码）。 */
.h-faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3.2v9.6M3.2 8h9.6' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}

.h-faq-item[open] summary::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8h9.6' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.h-faq-item[open] summary {
  color: var(--primary);
}

.h-faq-a {
  margin: 10px 0 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* 页面收尾：原先靠「结尾 CTA 条」的 margin-bottom 与页脚拉开距离；
   CTA 删除后（2026-10-15）不再需要底部留白 —— 否则页面上会多出一条 74px 的通栏空灰带。
   改为让最后一块分区（白底 .h-sec-alt）直接收在页脚上；它自带的 border-bottom
   也要去掉，否则会与页脚 border-top 贴成一条双线。 */
.h-sec-alt:last-of-type {
  border-bottom: none;
}

/* ===== 页脚 ===== */
.h-foot {
  padding: 36px 0 30px;
  background: #fff;
  border-top: 1px solid var(--border);
}

.h-foot-grid {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.h-foot-block {
  min-width: 190px;
}

.h-foot-block h4 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text);
}

.h-foot-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.h-foot-block li,
.h-foot-block a {
  font-size: 13px;
  color: var(--text-secondary);
}

.h-foot-block a {
  display: inline-block;
  padding: 3px 0; /* 点触目标高度 ≥ 24px（a11y） */
}

.h-foot-block a:hover {
  color: var(--primary);
}

.h-foot-about {
  max-width: 340px;
}

.h-foot-about p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.h-foot-aigc {
  margin-top: 26px;
  padding: 12px 14px;
  border-left: 3px solid var(--border);
  border-radius: 0 8px 8px 0;
  background: #f8fafc;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.h-foot-bottom {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-secondary);
}

/* ===== 已登录态（由 js/home.js 注入）：头像 + 用户名 → 下拉（会话 / 积分 / 退出） ===== */
.h-account {
  position: relative;
}

.h-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 200px;
  padding: 4px 12px 4px 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color 0.15s, color 0.15s;
  /* 从 <a> 改为 <button>：重置默认样式，保留胶囊外观 */
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
}

.h-user:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.14);
}

.h-user[aria-expanded="true"] {
  border-color: var(--primary);
  color: var(--primary);
}

.h-user:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.h-user-avatar {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
  overflow: hidden;
}

.h-user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 下拉箭头 */
.h-user-caret {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: transform 0.15s;
}

.h-user[aria-expanded="true"] .h-user-caret {
  transform: rotate(180deg);
}

/* 下拉菜单：贴着胶囊右下，右对齐；轻阴影 + 微位移动效 */
.h-account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 212px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.06);
  animation: hAccountIn 0.14s ease-out;
}

@keyframes hAccountIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: none; }
}

.h-account-menu[hidden] {
  display: none;
}

/* 菜单顶部：头像 + 用户名 + 邮箱（浅底分区，与下方菜单项分开） */
.h-account-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 2px 6px;
  padding: 10px;
  border-radius: 9px;
  background: #f8fafc;
}

.h-account-head-avatar {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
  overflow: hidden;
}

.h-account-head-meta {
  min-width: 0;
}

.h-account-head-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h-account-head-email {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h-account-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

/* 图标做成 24px 浅蓝圆角方块（与首页功能卡 .h-ico 同一视觉语言）：识别度比纯线框高 */
.h-account-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  box-sizing: content-box;
  padding: 4px;
  border-radius: 7px;
  background: var(--primary-light);
  color: var(--primary);
  transition: background 0.12s, color 0.12s;
}

/* 「积分」项右侧的余额：主色加粗 + 等宽数字（数字不跳动） */
.h-account-balance {
  margin-left: auto;
  padding-left: 12px;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
}

.h-account-item:hover .h-account-balance,
.h-account-item:focus-visible .h-account-balance {
  color: var(--primary-hover);
}

.h-account-balance.is-neg {
  color: #b91c1c;
}

/* 「会话」项右侧的会话数：比余额低调（灰字等宽） */
.h-account-count {
  margin-left: auto;
  padding-left: 12px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.h-account-item:hover .h-account-count,
.h-account-item:focus-visible .h-account-count {
  color: var(--primary);
}

.h-account-item:hover,
.h-account-item:focus-visible {
  background: var(--primary-light);
  color: var(--primary);
  outline: none;
}

.h-account-item:hover .h-account-icon,
.h-account-item:focus-visible .h-account-icon {
  background: #fff;
  color: var(--primary);
}

.h-account-item.is-danger {
  color: #4b5563;
}

.h-account-item.is-danger .h-account-icon {
  background: #fef2f2;
  color: #b91c1c;
}

.h-account-item.is-danger:hover,
.h-account-item.is-danger:focus-visible {
  background: #fef2f2;
  color: #b91c1c;
}

.h-account-item.is-danger:hover .h-account-icon,
.h-account-item.is-danger:focus-visible .h-account-icon {
  background: #fff;
  color: #b91c1c;
}

.h-account-sep {
  height: 1px;
  margin: 5px 8px;
  background: var(--border);
}

@media (prefers-reduced-motion: reduce) {
  .h-account-menu {
    animation: none;
  }

  .h-user-caret {
    transition: none;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .h-hero {
    padding: 60px 0 54px;
  }

  /* 图表轮播：中屏 3 列 */
  .h-fig-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .h-h1 {
    font-size: 36px;
  }

  .h-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .h-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .h-hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  /* 图表轮播：平板 2 列，按钮收回卡片内侧 */
  .h-fig-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .h-car-btn.prev {
    left: 6px;
  }

  .h-car-btn.next {
    right: 6px;
  }

  /* 窄屏：横向导航换成一个 details 折叠菜单（纯 CSS，无 JS） */
  .h-nav {
    display: none;
  }

  .h-menu {
    display: block;
  }
}

@media (max-width: 640px) {
  .h-wrap {
    padding: 0 18px;
  }

  /* 图表轮播：手机 1 列 */
  .h-fig-grid {
    grid-template-columns: 1fr;
  }

  .h-hero {
    padding: 44px 0 40px;
  }

  .h-h1 {
    font-size: 29px;
    letter-spacing: -0.3px;
  }

  .h-lead {
    font-size: 15px;
  }

  .h-sec {
    padding: 48px 0;
  }

  .h-h2 {
    font-size: 22px;
  }

  .h-grid,
  .h-steps {
    grid-template-columns: 1fr;
  }

  .h-head-actions .h-login {
    /* 窄屏顶部只留一个主动作（登录入口在折叠菜单与页脚）；
       ⚠ 只隐藏这条静态「登录」—— JS 注入的「退出登录」不能一起被藏掉 */
    display: none;
  }

  .h-user-name {
    display: none; /* 窄屏只留头像，省宽度 */
  }

  .h-user {
    padding: 4px;
  }
}

/* base.css 已在 reduce 下把过渡时长压到 0.01ms；这里额外去掉悬停位移，
   否则“减少动效”用户会看到卡片瞬间跳一下。 */
@media (prefers-reduced-motion: reduce) {
  .h-card:hover,
  .h-fig:hover {
    transform: none;
  }

  .h-figs {
    transition: none;
  }
}
