/* Tidytalk 网站样式：中英文页面共用，按 shadcn/ui（zinc）的样子做，和 App 的界面一致。
   设计稿是 docs/design/tidytalk-redesign.pen 里的「v3 · 官网」。颜色都定义成变量，深色模式只改变量。
   字体用系统字体，不从外部下载。 */

:root {
  --background: #ffffff;
  --foreground: #09090b;
  --card: #ffffff;
  --muted: #f4f4f5;
  /* 比 zinc-500 稍深一点：在白底和 --muted 上都至少 4.5:1（WCAG AA） */
  --muted-foreground: #6b6b74;
  --border: #e4e4e7;
  --input: #e4e4e7;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --ring: #a1a1aa;
  --strike: #dc2626;
  /* 绿色小圆点用 --local；表格里的"支持"是文字，用深一点的 --success 才够 4.5:1 */
  --local: #16a34a;
  --success: #15803d;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #09090b;
    --foreground: #fafafa;
    --card: #18181b;
    --muted: #27272a;
    --muted-foreground: #a1a1aa;
    --border: #2e2e33;
    --input: #3f3f46;
    --primary: #fafafa;
    --primary-foreground: #18181b;
    --ring: #71717a;
    --strike: #f87171;
    --local: #4ade80;
    --success: #4ade80;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* 点目录跳转时，标题不藏在顶部导航下面 */
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--foreground);
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--muted);
  border-radius: 4px;
  padding: 0.15em 0.4em;
  overflow-wrap: anywhere;
}

kbd {
  font-family: inherit;
  font-size: 0.8em;
  font-weight: 500;
  background: var(--muted);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0.1em 0.45em;
  white-space: nowrap;
}

h1,
h2,
h3 {
  font-weight: 700;
  text-wrap: balance;
}

.lead {
  text-wrap: pretty;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .container {
    padding: 0 28px;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--background);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius);
  z-index: 10;
}

.skip-link:focus {
  left: 16px;
}

/* ---------- 顶部导航 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--background) 85%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--foreground);
  font-weight: 600;
  font-size: 17px;
}

.brand img {
  width: 28px;
  height: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.nav-links a {
  color: var(--muted-foreground);
  transition: color 0.15s ease;
}

/* 文字链接的点击区域至少 24px 高（WCAG 2.2 目标尺寸），不改变看起来的大小 */
.nav-links a:not(.button) {
  display: inline-block;
  padding: 6px 2px;
  white-space: nowrap;
}

.nav-links a:not(.button):hover,
.nav-links a[aria-current="page"] {
  color: var(--foreground);
}

.nav-links a[aria-current="page"] {
  font-weight: 500;
}

/* 导航里的 GitHub 只显示图标 */
.nav-links svg {
  width: 18px;
  height: 18px;
  display: block;
}

.nav-github-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.nav-links .nav-section {
  display: none;
}

/* 手机上只留"使用指南"，其余页面从页脚进入 */
.nav-links .nav-section.nav-keep {
  display: list-item;
}

@media (max-width: 759px) {
  .nav-links {
    gap: 14px;
  }
}

/* 手机上放不下：GitHub 在首屏按钮和页脚里都有 */
@media (max-width: 479px) {
  .nav-links .nav-github {
    display: none;
  }
}

/* 320px 宽的老机型连"使用指南"也放不下，从页脚进入 */
@media (max-width: 359px) {
  .nav-links .nav-section.nav-keep {
    display: none;
  }
}

@media (min-width: 760px) {
  .nav-links .nav-section {
    display: list-item;
  }
}

/* ---------- 按钮 ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.button-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.button-primary:hover {
  background: color-mix(in srgb, var(--primary) 88%, var(--background));
}

.button-secondary {
  background: var(--background);
  color: var(--foreground);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}

.button-secondary:hover {
  background: var(--muted);
}

/* 比 .nav-links a 的灰色更具体，按钮上的字保持主按钮的颜色 */
.nav .button-small {
  min-height: 34px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--primary-foreground);
}

@media (max-width: 479px) {
  .nav .button-small {
    padding: 0 12px;
  }
}

.meta {
  margin: 16px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

/* ---------- 首屏 ---------- */

/* 只设上下间距，左右留白来自 .container */
.hero,
.hero-clean {
  padding-top: 64px;
  padding-bottom: 56px;
  text-align: center;
}

@media (min-width: 760px) {
  .hero,
  .hero-clean {
    padding-top: 104px;
    padding-bottom: 80px;
  }
}

/* 404 页面的图标 */
.hero-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
}

.hero h1,
.hero-clean h1 {
  font-size: clamp(38px, 6vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.032em;
  margin: 0 auto 20px;
  max-width: 14.5em;
}

.hero .lead,
.hero-clean .lead {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
  color: var(--muted-foreground);
  max-width: 32em;
  margin: 0 auto 32px;
}

.hero .button,
.hero-clean .button {
  min-height: 44px;
}

/* 首屏最上面的小标签：绿点 + 一句话 */
.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  margin: 0 0 24px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--background);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}

.eyebrow-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--local);
}

/* 首屏演示：一段口语被整理成文字，下方是录音指示器 */
.demo {
  max-width: 640px;
  margin: 40px auto 0;
  text-align: left;
}

@media (min-width: 760px) {
  .demo {
    margin-top: 56px;
  }
}

.demo-window {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.demo-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 13px;
}

.demo-titlebar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--muted);
  border: 1px solid var(--border);
}

.demo-titlebar strong {
  font-weight: 500;
}

.demo-body {
  padding: 20px 20px 24px;
  display: grid;
  gap: 16px;
}

.demo-row {
  margin: 0;
}

.demo-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.demo-said {
  color: var(--muted-foreground);
}

.demo-said del {
  color: var(--strike);
  text-decoration-thickness: 1.5px;
}

.demo-out {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.45;
}

@media (min-width: 760px) {
  .demo-out {
    font-size: 19px;
  }
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: var(--foreground);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.capsule {
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  height: 44px;
  margin: 16px auto 0;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  font-weight: 500;
}

.bars {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 22px;
}

.bars i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: currentColor;
  transform-origin: center;
  animation: level 1.2s ease-in-out infinite;
}

.bars i:nth-child(1) { animation-delay: -0.9s; }
.bars i:nth-child(2) { animation-delay: -0.2s; }
.bars i:nth-child(3) { animation-delay: -0.6s; }
.bars i:nth-child(4) { animation-delay: -1.1s; }
.bars i:nth-child(5) { animation-delay: -0.4s; }
.bars i:nth-child(6) { animation-delay: -0.8s; }
.bars i:nth-child(7) { animation-delay: -0.1s; }
.bars i:nth-child(8) { animation-delay: -0.7s; }
.bars i:nth-child(9) { animation-delay: -0.3s; }

@keyframes level {
  0%, 100% { transform: scaleY(0.25); }
  50% { transform: scaleY(1); }
}

/* 首页演示动画（由 demo.js 播放；不运行脚本时显示静态效果） */
.demo.is-animated .demo-said del {
  color: inherit;
  text-decoration-color: transparent;
  transition: color 0.25s ease, text-decoration-color 0.25s ease;
}

.demo.is-animated .demo-said del.struck {
  color: var(--strike);
  text-decoration-color: currentColor;
}

.demo.is-animated .capsule:not(.is-listening) .bars i {
  animation: none;
  transform: scaleY(0.3);
  transition: transform 0.3s ease;
}

/* ---------- 首页区块 ---------- */

.block {
  padding: 64px 0;
}

@media (min-width: 760px) {
  .block {
    padding: 96px 0;
  }
}

.block-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 32px;
}

@media (min-width: 760px) {
  .block-head {
    margin-bottom: 48px;
  }
}

.block-head h2 {
  font-size: clamp(28px, 3.4vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
}

.block-head p {
  color: var(--muted-foreground);
  margin: 0;
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.55;
}

/* 区块之间的分隔线，和内容一样宽 */
.divider {
  border: 0;
  border-top: 1px solid var(--border);
  width: calc(100% - 32px);
  max-width: 1024px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .divider {
    width: calc(100% - 56px);
  }
}

/* 图标卡片：桌面三列 */
.points {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 760px) {
  .points {
    grid-template-columns: repeat(3, 1fr);
  }
}

.points li {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}

/* 手机上竖着排太长：改成左右滑动的卡片，露出下一张的边，提示还能往后滑 */
@media (max-width: 759px) {
  .points {
    display: flex;
    gap: 12px;
    margin: 0 -16px;
    padding: 2px 16px 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .points::-webkit-scrollbar {
    display: none;
  }

  .points li {
    flex: 0 0 min(280px, 80%);
    scroll-snap-align: start;
    padding: 20px;
  }
}

@media (min-width: 640px) and (max-width: 759px) {
  .points {
    margin: 0 -28px;
    padding-inline: 28px;
    scroll-padding: 0 28px;
  }

  .points li {
    flex-basis: 46%;
  }
}

.icon-tile {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--muted);
  color: var(--foreground);
  margin-bottom: 16px;
}

.icon-tile svg {
  width: 20px;
  height: 20px;
}

.points h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 6px;
}

.points p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 15px;
  line-height: 1.55;
}

/* 隐私区块的小标签：绿点 + 一句话 */
.privacy-points .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  margin: 2px 0 8px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.privacy-points .tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--local);
}

/* 区块最下面的一行链接 */
.section-foot {
  text-align: center;
  color: var(--muted-foreground);
  font-size: 15px;
  margin: 32px 0 0;
}

/* 链接在句子中间（"……见 xxx。"），保持行内，句号才不会单独换行 */
.section-foot a {
  padding: 2px 0;
  color: var(--foreground);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.15s ease;
}

.section-foot a:hover {
  text-decoration-color: currentColor;
}

/* 功能版块里的链接跟着正文左对齐 */
.feature-split .section-foot {
  text-align: left;
  margin-top: 20px;
}

/* ---------- 一边文字一边截图 ---------- */

.feature-split {
  display: grid;
  gap: 24px;
  align-items: center;
}

@media (min-width: 900px) {
  .feature-split {
    grid-template-columns: 11fr 13fr;
    gap: 64px;
  }

  .feature-split.reverse {
    grid-template-columns: 13fr 11fr;
  }

  .feature-split.reverse > :first-child {
    order: 2;
  }
}

.feature-split + .feature-split {
  margin-top: 64px;
}

@media (min-width: 760px) {
  .feature-split + .feature-split {
    margin-top: 104px;
  }
}

.feature-split h2 {
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.022em;
  margin: 0 0 14px;
}

.feature-split > div > p {
  color: var(--muted-foreground);
  font-size: clamp(16px, 1.6vw, 17px);
  margin: 0 0 20px;
}

/* 打勾列表：浅灰圆底 + 勾 */
.ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 15px;
  line-height: 1.45;
}

.ticks li {
  position: relative;
  padding-left: 30px;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--muted);
}

.ticks li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 8px;
  height: 4.5px;
  border-left: 1.8px solid var(--foreground);
  border-bottom: 1.8px solid var(--foreground);
  transform: rotate(-45deg);
}

.feature-split figure {
  margin: 0;
}

/* 截图：带边框和浅阴影的卡片 */
.feature-split picture {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--muted);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.feature-split picture img {
  width: 100%;
}

/* AI 服务的三个标签：Ollama / LM Studio / 云端 */
.provider-switch {
  text-align: left;
}

.provider-tabs {
  display: inline-flex;
  gap: 2px;
  height: 40px;
  padding: 4px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: var(--muted);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.provider-tabs [role="tab"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-foreground);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.provider-tabs [role="tab"]:hover {
  color: var(--foreground);
}

.provider-tabs [role="tab"] img {
  width: 20px;
  height: 20px;
  border-radius: 5px;
}

.provider-tabs [role="tab"][aria-selected="true"] {
  background: var(--background);
  color: var(--foreground);
  box-shadow: var(--shadow-sm);
}

/* ---------- 使用场景：整张可点的卡片 ---------- */

.use-links {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .use-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1000px) {
  .use-links {
    grid-template-columns: repeat(4, 1fr);
  }
}

.use-links a {
  display: block;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  transition: background-color 0.15s ease;
}

.use-links a:hover {
  background: var(--muted);
}

.use-links h3 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 6px;
}

.use-links h3::after {
  content: "→";
  color: var(--muted-foreground);
  font-weight: 400;
  transition: transform 0.15s ease, color 0.15s ease;
}

.use-links a:hover h3::after {
  color: var(--foreground);
  transform: translateX(2px);
}

.use-links p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- 常见问题：手风琴 ---------- */

.faq-clean {
  max-width: 760px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.faq-clean details {
  border-bottom: 1px solid var(--border);
}

.faq-clean summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 32px 18px 0;
  font-weight: 500;
  line-height: 1.45;
  position: relative;
}

.faq-clean summary:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

/* 向下的箭头，展开后转成向上 */
.faq-clean summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted-foreground);
  border-bottom: 1.5px solid var(--muted-foreground);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq-clean details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq-clean details p {
  margin: 0 32px 18px 0;
  color: var(--muted-foreground);
  font-size: 15px;
}

/* ---------- 底部下载区：一张反色的大卡片 ---------- */

.cta-dark {
  width: calc(100% - 32px);
  max-width: 1024px;
  margin: 0 auto 64px;
  padding: 48px 4px;
  border-radius: 16px;
  background: var(--primary);
  color: var(--primary-foreground);
  text-align: center;
}

@media (min-width: 640px) {
  .cta-dark {
    width: calc(100% - 56px);
    margin-bottom: 96px;
    padding: 72px 20px;
  }
}

.cta-dark h2 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
}

.cta-dark .button-primary {
  background: var(--primary-foreground);
  color: var(--primary);
}

.cta-dark .button-primary:hover {
  background: color-mix(in srgb, var(--primary-foreground) 88%, var(--primary));
}

.cta-dark .button-secondary {
  background: transparent;
  color: var(--primary-foreground);
  border-color: color-mix(in srgb, var(--primary-foreground) 24%, transparent);
  box-shadow: none;
}

.cta-dark .button-secondary:hover {
  background: color-mix(in srgb, var(--primary-foreground) 10%, transparent);
}

.cta-dark .meta {
  color: color-mix(in srgb, var(--primary-foreground) 60%, var(--primary));
}

/* ---------- 页脚 ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 56px;
  color: var(--muted-foreground);
  font-size: 13px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 24px;
}

.footer-grid > :first-child {
  grid-column: 1 / -1;
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1.6fr repeat(5, 1fr);
  }

  .footer-grid > :first-child {
    grid-column: auto;
  }
}

.footer-grid p {
  margin: 12px 0 0;
  max-width: 28em;
  line-height: 1.6;
}

.footer-grid p a {
  color: var(--muted-foreground);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-grid h2 {
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
  margin: 4px 0 10px;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

/* 点击区域至少 24px 高；列表间距相应收小 */
.footer-grid li a {
  display: inline-block;
  padding: 4px 0;
  color: var(--muted-foreground);
  line-height: 1.4;
  transition: color 0.15s ease;
}

.footer-grid li a:hover,
.footer-grid p a:hover {
  color: var(--foreground);
}

.footer-grid .brand {
  font-size: 16px;
}

/* ---------- 文章页 ---------- */

/* 面包屑和正文一样宽（760） */
.breadcrumbs {
  padding-top: 24px;
  font-size: 14px;
  color: var(--muted-foreground);
}

@media (min-width: 640px) {
  .breadcrumbs.container {
    max-width: calc(760px + 56px);
  }
}

.breadcrumbs a {
  display: inline-block;
  padding: 4px 0;
  color: var(--muted-foreground);
  transition: color 0.15s ease;
}

.breadcrumbs a:hover,
.breadcrumbs [aria-current="page"] {
  color: var(--foreground);
}

.breadcrumbs [aria-current="page"] {
  font-weight: 500;
}

.page {
  padding-bottom: 96px;
}

.page-head {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 0 24px;
}

.page-head h1 {
  font-size: clamp(32px, 4.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.028em;
  margin: 0 0 14px;
}

.page-head .lead {
  font-size: clamp(17px, 1.9vw, 19px);
  line-height: 1.6;
  color: var(--muted-foreground);
  margin: 0 0 14px;
}

.page-head .updated {
  color: var(--muted-foreground);
  font-size: 14px;
  margin: 0;
}

.prose {
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.75;
}

.prose h2 {
  font-size: clamp(22px, 2.6vw, 24px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 48px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.prose h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.012em;
  margin: 32px 0 8px;
}

.prose p {
  margin: 0 0 16px;
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 1.4em;
}

.prose li {
  margin-bottom: 8px;
}

.prose li::marker {
  color: var(--muted-foreground);
}

.prose li > ul,
.prose li > ol {
  margin-top: 8px;
}

.prose strong {
  font-weight: 600;
}

.prose a {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--foreground) 30%, transparent);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.15s ease;
}

.prose a:hover {
  text-decoration-color: currentColor;
}

.prose pre {
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0 0 16px;
  line-height: 1.6;
}

.prose pre code {
  background: none;
  padding: 0;
  font-size: 13.5px;
  overflow-wrap: normal;
}

/* 表格：圆角边框，表头浅灰；窄屏时整张表横向滚动 */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--background);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}

.prose th {
  font-weight: 500;
  white-space: nowrap;
}

.prose thead th {
  background: var(--muted);
  color: var(--muted-foreground);
}

.prose tr:last-child td,
.prose tr:last-child th {
  border-bottom: 0;
}

/* 对比表：行标题可以换行，每列保留最小宽度 */
.prose th[scope="row"] {
  white-space: normal;
  min-width: 130px;
}

.prose td {
  min-width: 140px;
}

.prose td .yes {
  color: var(--success);
  font-weight: 500;
}

.prose td .no {
  color: var(--muted-foreground);
}

/* 目录：一张卡片，两列 */
.toc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin: 8px 0 16px;
}

.prose .toc h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
}

.toc ol {
  margin: 0;
  padding-left: 1.4em;
  columns: 2 220px;
  column-gap: 32px;
  font-size: 14px;
  line-height: 1.5;
}

/* 用下内边距而不是外边距：外边距会被带到第二列顶上，两列对不齐 */
.prose .toc li {
  margin: 0;
  padding-bottom: 8px;
  break-inside: avoid;
  color: var(--muted-foreground);
}

.prose .toc a {
  color: var(--muted-foreground);
  font-weight: 400;
  text-decoration: none;
}

.prose .toc a:hover {
  color: var(--foreground);
}

/* 说明框：浅灰底，左边一个 i 图标 */
.callout {
  position: relative;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px 14px 44px;
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.6;
}

.callout::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 17px;
  width: 16px;
  height: 16px;
  background: var(--muted-foreground);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* 文章最后的下载卡片 */
.page-cta {
  max-width: 760px;
  margin: 56px auto 0;
  padding: 32px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.page-cta h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.018em;
  margin: 0 0 8px;
}

.page-cta p {
  color: var(--muted-foreground);
  font-size: 15px;
  margin: 0 0 20px;
}

.related {
  max-width: 760px;
  margin: 40px auto 0;
}

.related h2 {
  font-size: 18px;
  margin: 0 0 12px;
}

.related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

/* ---------- 更新日志 ---------- */

.release {
  padding: 36px 0 32px;
  border-bottom: 1px solid var(--border);
}

.prose .release h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.024em;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
}

.prose .release h2 a {
  font-weight: inherit;
  text-decoration: none;
}

.release-date {
  color: var(--muted-foreground);
  font-size: 14px;
}

/* 每个版本下面的安装说明 */
.release > p:not([class]) {
  color: var(--muted-foreground);
  font-size: 15px;
  line-height: 1.6;
}

.checksum {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-bottom: 0 !important;
}

.checksum code {
  font-size: 12px;
  color: var(--muted-foreground);
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .bars i,
  .caret {
    animation: none;
  }

  .bars i {
    transform: scaleY(0.6);
  }
}
