/* Xenia Canary 中文站样式表
   主色取自仓库 Logo：#FFD85F / #555555
   浅色扁平 · 系统字体栈 · 无外部依赖 · 兼容 Chromium 86+ */

:root {
  --primary: #FFD85F;
  --primary-dark: #E8B930;
  --primary-deep: #8A6D00;
  --accent: #555555;
  --ink: #2B2B2B;
  --ink-soft: #555555;
  --ink-mute: #6E6E6E;
  --line: #E3E0D6;
  --bg: #FAFAF7;
  --card: #FFFFFF;
  --code-bg: #F4F2EA;
  --danger-bg: #FDF3F2;
  --danger-ink: #96281B;
  --danger-line: #EAC8C3;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(43, 43, 43, 0.06);
  --shadow-lift: 0 8px 28px rgba(43, 43, 43, 0.12);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; border: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--primary-deep); text-decoration: underline; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #FFFFFF;
  padding: 10px 18px;
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; color: #FFFFFF; text-decoration: none; }

/* 顶部导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.94);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink);
}
.brand img { width: 32px; height: 32px; }
.brand:hover { text-decoration: none; }
.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-weight: 500;
}
.nav-links a:hover { background: #FFFFFF; color: var(--ink); text-decoration: none; }
.nav-links a[aria-current="page"] {
  background: var(--primary);
  color: var(--ink);
  font-weight: 700;
}
.nav-toggle { display: none; }

/* 首页英雄区 */
.page-hero {
  background: linear-gradient(180deg, #FFFFFF 0%, #FAFAF7 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 24px 56px;
  display: flex;
  align-items: center;
  gap: 56px;
}
.hero-copy { flex: 1 1 0; min-width: 0; }
.eyebrow {
  display: inline-block;
  background: var(--primary);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.25;
}
.hero-copy .lede {
  font-size: 1.125rem;
  color: var(--ink-soft);
  margin: 0 0 28px;
  max-width: 34em;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { flex: 0 0 400px; max-width: 400px; }
.hero-visual img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-primary {
  background: var(--primary);
  color: var(--ink);
  border-color: var(--primary-dark);
}
.btn-primary:hover { background: var(--primary-dark); color: var(--ink); }
.btn-ghost {
  background: #FFFFFF;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--primary-deep); color: var(--ink); }
.btn-lg { min-height: 52px; padding: 14px 34px; font-size: 1.0625rem; }

/* 通用区块 */
.section { padding: 64px 0; }
.section-alt { background: #FFFFFF; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section-head { max-width: 46em; margin-bottom: 40px; }
.section-head h2 { margin: 0 0 12px; font-size: 1.75rem; line-height: 1.3; }
.section-head p { margin: 0; color: var(--ink-soft); }

/* 统计条 */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.stat-label { font-size: 0.8125rem; color: var(--ink-mute); font-weight: 600; }
.stat-value { font-size: 1.375rem; font-weight: 700; margin-top: 4px; }
.stat-note { font-size: 0.8125rem; color: var(--ink-mute); margin-top: 2px; }

/* 卡片 */
.card-grid { display: grid; gap: 20px; }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 24px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card h3 { margin: 0 0 10px; font-size: 1.125rem; }
.card h3 .icon { color: var(--primary-deep); margin-right: 8px; }
.card p { margin: 0; color: var(--ink-soft); }

/* 徽章 */
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.badge {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #FFFFFF;
  color: var(--ink-soft);
}
.badge-gold { background: var(--primary); border-color: var(--primary-dark); color: var(--ink); }

/* 规格表 */
.spec-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); }
.spec-table caption { text-align: left; font-weight: 700; padding: 16px 20px 4px; font-size: 1.0625rem; }
.spec-table th, .spec-table td {
  text-align: left;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.spec-table thead th { background: var(--code-bg); font-size: 0.875rem; color: var(--ink-soft); }
.spec-table tbody tr:last-child td { border-bottom: 0; }
.spec-table tbody th { width: 8em; font-weight: 600; }
.spec-table td em { font-style: normal; color: var(--ink-mute); }

/* 步骤 */
.steps { counter-reset: step; margin: 0; padding: 0; list-style: none; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 28px 64px;
  border-left: 2px solid var(--line);
  margin-left: 20px;
}
.steps > li:last-child { padding-bottom: 0; border-left-color: transparent; }
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: -21px;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--primary-dark);
  color: var(--ink);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps > li h3 { margin: 4px 0 8px; font-size: 1.0625rem; }
.steps > li p { margin: 0; color: var(--ink-soft); }

/* FAQ */
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.faq-item summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev { color: var(--primary-deep); transition: transform 0.2s ease; }
.faq-item[open] summary .chev { transform: rotate(90deg); }
.faq-item .faq-body { padding: 0 20px 18px; color: var(--ink-soft); }
.faq-item .faq-body p:first-child { margin-top: 0; }
.faq-item .faq-body p:last-child { margin-bottom: 0; }

/* 提示框 */
.notice { border-radius: var(--radius-sm); padding: 16px 20px; margin: 20px 0; }
.notice p { margin: 0; }
.notice p + p { margin-top: 8px; }
.notice-danger { background: var(--danger-bg); border: 1px solid var(--danger-line); color: var(--danger-ink); }

/* 代码与路径 */
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--code-bg);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--ink);
  word-break: break-all;
}

/* 页脚 */
.site-footer { border-top: 1px solid var(--line); background: #FFFFFF; margin-top: 72px; }
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 12px; }
.footer-brand img { width: 28px; height: 28px; }
.site-footer p { margin: 0 0 8px; font-size: 0.875rem; color: var(--ink-soft); }
.site-footer h2 { font-size: 0.9375rem; margin: 0 0 12px; }
.footer-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-nav a { font-size: 0.875rem; color: var(--ink-soft); display: inline-flex; min-height: 24px; align-items: center; }
.footer-bottom { border-top: 1px solid var(--line); }
.footer-bottom .container { padding-top: 18px; padding-bottom: 24px; }
.footer-bottom p { margin: 0 0 4px; font-size: 0.8125rem; color: var(--ink-mute); }

/* 下载弹窗 */
.modal-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(43, 43, 43, 0.55);
  display: none;
  z-index: 300;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.modal-backdrop.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  padding: 24px;
}
.modal {
  background: #FFFFFF;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  width: 100%;
  max-width: 560px;
  max-height: calc(100dvh - 48px);
  overflow: auto;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 0; font-size: 1.25rem; }
.modal-close {
  background: none;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--code-bg); color: var(--ink); }
.modal-body { padding: 20px 24px 28px; }
.qr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 8px 0 4px; }
.qr-slot {
  border: 2px dashed var(--line);
  border-radius: var(--radius-sm);
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg);
  padding: 16px;
}
.qr-slot .qr-icon { color: var(--ink-mute); }
.qr-slot .qr-code {
  width: 176px;
  height: 176px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px;
}
.qr-slot .qr-label {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  font-weight: 600;
  text-align: center;
  line-height: 1.5;
}
.modal-notice { font-size: 0.8125rem; color: var(--ink-mute); margin-top: 14px; }

/* 面包屑 */
.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 0; font-size: 0.875rem; }
.breadcrumb li { display: flex; align-items: center; gap: 6px; color: var(--ink-mute); }
.breadcrumb li + li::before { content: "/"; color: var(--ink-mute); }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* 内页标题 */
.page-head { padding: 48px 24px 8px; }
.page-head .container { padding-left: 0; padding-right: 0; }
.page-head h1 { margin: 0 0 10px; font-size: clamp(1.625rem, 3.5vw, 2.25rem); line-height: 1.3; }
.page-head .lede { margin: 0; color: var(--ink-soft); max-width: 44em; font-size: 1.0625rem; }

/* 目录 */
.toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 36px; }
.toc h2 { margin: 0 0 10px; font-size: 1rem; }
.toc ol { margin: 0; padding-left: 22px; }
.toc a { color: var(--ink-soft); }

/* 404 */
.notfound { text-align: center; padding: 96px 24px 80px; }
.notfound .code { font-size: clamp(4rem, 12vw, 7rem); font-weight: 800; color: var(--accent); line-height: 1; }
.notfound .code span { color: var(--primary-deep); }
.notfound h1 { margin: 12px 0 8px; }
.notfound p { color: var(--ink-soft); margin: 0 0 28px; }

/* 入场动画 */
@media (prefers-reduced-motion: no-preference) {
  .anim-up { animation: fadeUp 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
  .anim-up:nth-child(2) { animation-delay: 0.08s; }
  .anim-up:nth-child(3) { animation-delay: 0.16s; }
  .anim-up:nth-child(4) { animation-delay: 0.24s; }
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* 响应式 */
@media (max-width: 960px) {
  .hero-inner { flex-direction: column-reverse; text-align: center; padding-top: 48px; }
  .hero-copy .lede { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { flex: 0 1 320px; }
  .card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 48px 0; }
  .card-grid.cols-2, .card-grid.cols-3 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .qr-row { grid-template-columns: 1fr; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #FFFFFF;
    cursor: pointer;
    color: var(--ink-soft);
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    flex-direction: column;
    padding: 8px 16px 12px;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { min-height: 48px; }
}
