/* ============================================================
   AutoHotkey 中文站样式表
   基色：官方 Logo 银灰金属色系（#F3F3F3 / #B7B7B7 / #45474A）
   强调：绿色系，多色功能点缀
   兼容：Chrome 86 内核（-webkit- 前缀、无 inset 简写）
   ============================================================ */

:root {
  /* 品牌基色（源自仓库/官方 Logo 取样） */
  --c-brand: #45474a;          /* Logo 描边深灰：标题/深色元素 */
  --c-brand-light: #6b6d70;    /* Logo 中间调 */
  --c-brand-silver: #b7b7b7;   /* Logo 银灰：边框/分隔 */
  --c-brand-silver-light: #e9eaeb; /* Logo 浅银：背景块 */
  --c-brand-highlight: #f3f3f3;    /* Logo 高光银 */

  /* 绿色强调系（按钮/链接/高亮，对比度均满足 WCAG AA） */
  --c-green: #2a8050;          /* 主绿 */
  --c-green-dark: #226b42;     /* 深绿 */
  --c-green-deeper: #1d5e39;   /* 悬停加深 */
  --c-green-text: #26824d;     /* 链接绿 */
  --c-green-soft: #eaf6ef;     /* 浅绿底 */
  --c-green-border: #bfe3ce;   /* 浅绿边 */

  /* 六色功能点缀（卡片图标，深色版保证浅底可读） */
  --ic1: #26824d; --ic1-bg: #e7f5ed;
  --ic2: #2f6cb3; --ic2-bg: #e9f1fa;
  --ic3: #c06a17; --ic3-bg: #fdf0e3;
  --ic4: #7a55b8; --ic4-bg: #f2edfa;
  --ic5: #1a8a86; --ic5-bg: #e6f5f4;
  --ic6: #56606e; --ic6-bg: #eef1f4;

  --c-accent: #1d5e39;         /* 悬停强调（绿系加深） */
  --c-bg: #ffffff;
  --c-bg-soft: #f7f7f8;
  --c-text: #2a2c2e;
  --c-text-muted: #5f6266;
  --c-border: #dcdedf;
  --c-code-bg: #f2f3f4;
  --c-focus: #1d6b42;          /* focus-visible 辅助（绿系，AA） */
  --shadow-1: 0 1px 3px rgba(42, 44, 46, .08);
  --shadow-2: 0 6px 24px rgba(42, 44, 46, .12);
  --radius: 10px;
  --radius-lg: 16px;
  --header-h: 64px;
  --container: 1120px;
}

/* ---------- 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-green-text); text-decoration: none; }
a:hover { color: var(--c-green-deeper); text-decoration: underline; }

::selection { background: var(--c-green); color: #fff; }

/* focus-visible 可访问性（:focus 回退保证旧内核也有焦点环） */
a:focus, button:focus, [tabindex]:focus, summary:focus {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: 4px;
}
a:focus:not(:focus-visible), button:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible), summary:focus:not(:focus-visible) {
  outline: none;
}

/* skip link */
.skip-link {
  position: absolute; left: 16px; top: -60px;
  background: var(--c-green-dark); color: #fff;
  padding: 10px 18px; border-radius: 0 0 var(--radius) var(--radius);
  z-index: 100; font-weight: 600; transition: top .2s ease;
}
.skip-link:focus { top: 0; color: #fff; text-decoration: none; }

/* ---------- 布局 ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
main { display: block; }

/* ---------- 页头 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--c-border);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--c-text); }
.brand:hover { text-decoration: none; color: var(--c-green-dark); }
.brand svg { flex: none; }
.brand .sub { font-size: 12px; font-weight: 400; color: var(--c-text-muted); display: block; line-height: 1.2; }

.main-nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 16px;
  border-radius: 8px; color: var(--c-text-muted); font-weight: 500;
  transition: background .2s ease, color .2s ease;
}
.main-nav a:hover { background: var(--c-green-soft); color: var(--c-green-dark); text-decoration: none; }
.main-nav a[aria-current="page"] { background: var(--c-green); color: #fff; }

.nav-toggle { display: none; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 26px;
  border-radius: 10px; border: 1.5px solid transparent;
  font-size: 16px; font-weight: 600; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  -webkit-appearance: none; appearance: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--c-green), var(--c-green-dark));
  color: #fff; box-shadow: var(--shadow-1);
}
.btn-primary:hover {
  background: linear-gradient(180deg, var(--c-green-dark), var(--c-green-deeper));
  color: #fff; text-decoration: none; box-shadow: var(--shadow-2);
}
.btn-ghost { background: transparent; border-color: var(--c-green); color: var(--c-green-dark); }
.btn-ghost:hover { background: var(--c-green-soft); text-decoration: none; }
.btn-lg { min-height: 52px; padding: 0 34px; font-size: 17px; }

/* ---------- 英雄区 ---------- */
.hero { padding: 72px 0 64px; overflow: hidden; position: relative; }
.hero::before {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background:
    radial-gradient(600px 300px at 85% 10%, rgba(42,128,80,.10), transparent 70%),
    radial-gradient(500px 260px at 8% 90%, rgba(233,234,235,.95), transparent 70%);
  pointer-events: none;
}
.hero .inner { display: grid; grid-template-columns: 1.08fr .92fr; gap: 48px; align-items: center; position: relative; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--c-green-soft); border: 1px solid var(--c-green-border);
  color: #1d5f3a; font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero-kicker svg [fill="#45474a"] { fill: var(--c-green); }
.hero-kicker svg [stroke="#45474a"] { stroke: var(--c-green); }
.hero h1 { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.25; margin: 0 0 18px; letter-spacing: -.5px; }
.hero h1 .grad {
  background: linear-gradient(120deg, #2fa062 10%, #26824d 55%, #1d5e39 95%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--c-green-text);
}
.hero .lead { font-size: 18px; color: var(--c-text-muted); margin: 0 0 30px; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 14px; color: var(--c-text-muted); }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta svg { flex: none; }
.hero-meta svg [stroke="#5f6266"] { stroke: var(--c-green-text); }

.hero-fig { margin: 0; }
.hero-fig svg, .hero-fig img {
  width: 100%; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  background: #fff;
}
.hero-fig figcaption { font-size: 13px; color: var(--c-text-muted); margin-top: 10px; text-align: center; }

/* 滚动进入动画 */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- 通用区块 ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--c-bg-soft); }
.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 12px; letter-spacing: -.3px; }
.section-head h2::after {
  content: ""; display: block; width: 44px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--c-green), var(--c-green-border));
  margin: 14px auto 0;
}
.section-head p { color: var(--c-text-muted); margin: 0; }

/* 卡片网格 */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  padding: 28px 26px; box-shadow: var(--shadow-1);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--c-green-border); }
.card h3 { margin: 14px 0 10px; font-size: 19px; }
.card p { margin: 0; color: var(--c-text-muted); font-size: 15px; }
.card .icon-wrap {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
/* 六色循环：彩色底 + 图标着色 */
.card:nth-child(6n+1) .icon-wrap { background: var(--ic1-bg); }
.card:nth-child(6n+1) .icon-wrap svg [stroke="#45474a"] { stroke: var(--ic1); }
.card:nth-child(6n+1) .icon-wrap svg [fill="#45474a"] { fill: var(--ic1); }
.card:nth-child(6n+2) .icon-wrap { background: var(--ic2-bg); }
.card:nth-child(6n+2) .icon-wrap svg [stroke="#45474a"] { stroke: var(--ic2); }
.card:nth-child(6n+2) .icon-wrap svg [fill="#45474a"] { fill: var(--ic2); }
.card:nth-child(6n+3) .icon-wrap { background: var(--ic3-bg); }
.card:nth-child(6n+3) .icon-wrap svg [stroke="#45474a"] { stroke: var(--ic3); }
.card:nth-child(6n+3) .icon-wrap svg [fill="#45474a"] { fill: var(--ic3); }
.card:nth-child(6n+4) .icon-wrap { background: var(--ic4-bg); }
.card:nth-child(6n+4) .icon-wrap svg [stroke="#45474a"] { stroke: var(--ic4); }
.card:nth-child(6n+4) .icon-wrap svg [fill="#45474a"] { fill: var(--ic4); }
.card:nth-child(6n+5) .icon-wrap { background: var(--ic5-bg); }
.card:nth-child(6n+5) .icon-wrap svg [stroke="#45474a"] { stroke: var(--ic5); }
.card:nth-child(6n+5) .icon-wrap svg [fill="#45474a"] { fill: var(--ic5); }
.card:nth-child(6n+6) .icon-wrap { background: var(--ic6-bg); }
.card:nth-child(6n+6) .icon-wrap svg [stroke="#45474a"] { stroke: var(--ic6); }
.card:nth-child(6n+6) .icon-wrap svg [fill="#45474a"] { fill: var(--ic6); }

/* 代码块 */
.code-block {
  background: var(--c-code-bg); border: 1px solid var(--c-border);
  border-radius: var(--radius); overflow: hidden;
}
.code-block .code-title {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; font-size: 13px; color: var(--c-text-muted);
  border-bottom: 1px solid var(--c-border); background: #eceef0;
}
.code-block .code-title::before {
  content: ""; display: inline-block; flex: none;
  width: 9px; height: 9px; border-radius: 50%;
  background: #58b368; box-shadow: 14px 0 0 #e0a33e, 28px 0 0 #e05656;
  margin-right: 30px;
}
.code-block pre { margin: 0; padding: 18px 20px; overflow-x: auto; }
.code-block code {
  font-family: Consolas, "SF Mono", "Courier New", monospace;
  font-size: 14.5px; line-height: 1.8; color: #2f3133;
}
.code-block .cm { color: #7a8087; }

/* 表格 */
.table-wrap { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--radius); }
table.spec { width: 100%; border-collapse: collapse; background: #fff; font-size: 15px; }
table.spec th, table.spec td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--c-border); }
table.spec th { background: #eef6f1; font-weight: 600; white-space: nowrap; }
table.spec tr:last-child td { border-bottom: none; }
table.spec td.k { color: var(--c-text-muted); white-space: nowrap; font-weight: 500; }

/* FAQ 手风琴 */
.faq-item { border: 1px solid var(--c-border); border-radius: var(--radius); background: #fff; margin-bottom: 12px; overflow: hidden; }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 44px; padding: 16px 20px;
  font-weight: 600; font-size: 16px;
  transition: background .2s ease;
}
.faq-item summary:hover { background: var(--c-green-soft); }
.faq-item[open] summary { background: var(--c-green-soft); color: var(--c-green-dark); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev { flex: none; transition: transform .25s ease; color: var(--c-green-text); }
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item .faq-body { padding: 14px 20px 18px; color: var(--c-text-muted); }
.faq-item .faq-body p { margin: 0 0 10px; }
.faq-item .faq-body p:last-child { margin: 0; }
.faq-item .faq-body code { background: var(--c-code-bg); padding: 2px 7px; border-radius: 5px; font-size: 14px; }

/* 步骤 */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step { display: flex; gap: 18px; align-items: flex-start; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 22px 24px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(160deg, var(--c-green), var(--c-green-dark));
  color: #fff; font-weight: 700; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { margin: 4px 0 6px; font-size: 17px; }
.step p { margin: 0; color: var(--c-text-muted); font-size: 15px; }

/* 版本徽章 */
.badge {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; line-height: 1.6;
  background: var(--c-green-soft); color: var(--c-green-dark); border: 1px solid var(--c-green-border);
}
.badge-dark { background: var(--c-green-dark); color: #fff; border-color: var(--c-green-dark); }

/* 下载卡 */
.dl-card {
  background: #fff; border: 1.5px solid var(--c-border); border-radius: var(--radius-lg);
  padding: 30px 28px; display: flex; flex-direction: column; gap: 14px;
  transition: box-shadow .25s ease, border-color .25s ease;
}
.dl-card:hover { box-shadow: var(--shadow-2); border-color: var(--c-green-border); }
.dl-card h3 { margin: 0; font-size: 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dl-card h3 svg [stroke="#45474a"] { stroke: var(--c-green); }
.dl-card h3 svg [fill="#45474a"] { fill: var(--c-green); }
.dl-card .meta { color: var(--c-text-muted); font-size: 14.5px; margin: 0; }
.dl-card ul { margin: 0; padding-left: 20px; color: var(--c-text-muted); font-size: 14.5px; }
.dl-card .btn { margin-top: 6px; }

/* 提示框 */
.note {
  background: var(--c-green-soft); border-left: 4px solid var(--c-green);
  border-radius: 8px; padding: 16px 20px; color: var(--c-text); font-size: 15px;
}
.note p { margin: 0; }
.note strong { color: var(--c-green-dark); }

/* ---------- 下载弹窗 ---------- */
.modal-backdrop {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 90;
  background: rgba(30, 32, 34, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.modal-backdrop.is-open { opacity: 1; visibility: visible; }
.modal {
  background: #fff; border-radius: var(--radius-lg);
  max-width: 560px; width: 100%;
  box-shadow: 0 18px 60px rgba(0,0,0,.25);
  transform: translateY(14px) scale(.97);
  transition: transform .25s ease;
  overflow: hidden;
}
.modal-backdrop.is-open .modal { transform: none; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--c-border);
}
.modal-head h2 { margin: 0; font-size: 18px; color: var(--c-green-dark); }
.modal-close {
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; border-radius: 8px; cursor: pointer; color: var(--c-text-muted);
}
.modal-close:hover { background: var(--c-green-soft); color: var(--c-green-dark); }
.modal-body { padding: 24px; }
.modal-body .hint { font-size: 14px; color: var(--c-text-muted); margin: 0 0 18px; }
.qr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.qr-box {
  border: 2px dashed var(--c-green-border); border-radius: var(--radius);
  min-height: 190px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  background: #fbfefc; padding: 18px 12px; text-align: center;
}
.qr-box .qr-img {
  width: 160px; height: 160px; max-width: 100%;
  object-fit: contain; border-radius: 6px;
  background: #fff; padding: 6px;
  box-shadow: 0 1px 4px rgba(42, 44, 46, .10);
}
.qr-box .qr-label { font-size: 15px; font-weight: 600; color: var(--c-text); }
.modal-foot { padding: 0 24px 22px; font-size: 13px; color: var(--c-text-muted); }

/* 正文通用 */
.page-body h2 { font-size: clamp(22px, 2.6vw, 28px); margin: 1.6em 0 .7em; letter-spacing: -.3px; }
.page-body h3 { font-size: 19px; margin: 1.5em 0 .6em; }
.page-body p { margin: 0 0 1em; }
.page-body ul, .page-body ol { padding-left: 1.4em; }
.page-body li { margin-bottom: .45em; }
.page-body code:not(pre code) { background: var(--c-code-bg); border: 1px solid var(--c-border); padding: 1px 7px; border-radius: 5px; font-size: 14px; font-family: Consolas, "Courier New", monospace; }

/* ---------- 页脚 ---------- */
.site-footer { background: #26282a; color: #c9cacc; padding: 48px 0 36px; margin-top: 40px; }
.site-footer .inner { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: flex-start; }
.site-footer .f-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #fff; font-size: 16px; margin: 0; }
.site-footer nav ul { display: flex; flex-wrap: wrap; gap: 4px 22px; list-style: none; margin: 10px 0 0; padding: 0; }
.site-footer nav a { color: #c9cacc; display: inline-flex; min-height: 44px; align-items: center; font-size: 14.5px; }
.site-footer nav a:hover { color: #6fce9b; }
.site-footer .copy { border-top: 1px solid #3d4043; margin-top: 30px; padding-top: 22px; font-size: 13.5px; color: #9a9c9f; display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: space-between; }
.site-footer .copy p { margin: 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 920px) {
  .hero .inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-fig { order: -1; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid-3, .grid-2, .qr-row { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .hero { padding: 48px 0 44px; }
  .site-header .inner { position: relative; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--c-border);
    background: #fff; border-radius: 8px; cursor: pointer;
  }
  .main-nav {
    position: absolute; top: calc(100% + 1px); left: -24px; right: -24px;
    background: #fff; border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-2);
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 10px 0; }
  .main-nav a { display: flex; width: 100%; padding: 0 24px; border-radius: 0; min-height: 48px; }
  .main-nav a[aria-current="page"] { background: var(--c-green-soft); color: var(--c-green-dark); }
}

/* ---------- 面包屑 ---------- */
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; margin: 0 0 22px; padding: 0; font-size: 13.5px; }
.breadcrumb li { display: flex; align-items: center; color: var(--c-text-muted); }
.breadcrumb li + li::before { content: "/"; margin: 0 8px; color: var(--c-brand-silver); }
.breadcrumb a { color: var(--c-green-text); display: inline-flex; min-height: 24px; align-items: center; }
.breadcrumb a:hover { color: var(--c-green-deeper); text-decoration: none; }
.breadcrumb [aria-current="page"] { color: var(--c-text); font-weight: 600; }
