/* Airecmark V3 — 站点公共样式 (全新编写)
   设计系统 token 来自模板 tailwind-config; 此处只放组件外规则 */

:root {
  --am-primary: #6d28d9;
  --am-primary-deep: #5300b7;
  --am-surface: #faf8ff;
  --am-border: #e4e7ec;
  --am-text: #0f172a;
  --am-muted: #64748b;
  --am-mono: 'JetBrains Mono', monospace;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--am-surface);
  color: var(--am-text);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* ---- 全局横向溢出保护 ----
   装饰性 absolute 色块在移动端会撑宽 layout viewport, 把 fixed 页头推出屏外 */
html, body { overflow-x: hidden; }
@supports (overflow-x: clip) {
  html, body { overflow-x: clip; }
}

/* ---- 固定页头保护 ---- */
header { width: 100%; max-width: 100%; }

/* 注意: 勿给 .hidden 加 !important — 会压死模板导航的 hidden xl:flex 响应式 (Play CDN 已提供 .hidden / xl:flex) */
.hidden { display: none; }

/* ---- 页头滚动阴影 ---- */
header.is-scrolled { box-shadow: 0 4px 24px rgba(46, 16, 101, 0.12); }

/* ---- 移动端抽屉导航 (site.js 注入 DOM) ---- */
html.am-nav-hidden header > div:first-child { position: relative; padding-right: 56px; }
.am-burger {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
  width: 40px; height: 40px; padding: 0 9px;
  border: 1px solid var(--am-border); border-radius: 10px;
  background: #f2f3ff; cursor: pointer;
}
.am-burger-bar { display: block; height: 2px; width: 100%; border-radius: 2px; background: var(--am-primary); }
.am-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(15, 8, 35, 0.55); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.am-backdrop.is-open { opacity: 1; pointer-events: auto; }
.am-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: min(84vw, 340px); display: flex; flex-direction: column;
  background: #fff; border-left: 1px solid var(--am-border);
  box-shadow: -12px 0 40px rgba(46, 16, 101, .18);
  transform: translateX(105%); transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}
.am-drawer.is-open { transform: translateX(0); }
.am-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--am-border); }
.am-drawer-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; }
.am-drawer-logo { height: 28px; width: auto; }
.am-drawer-close {
  border: 1px solid var(--am-border); background: #f2f3ff; border-radius: 10px;
  width: 36px; height: 36px; cursor: pointer; color: var(--am-muted); font-size: 18px; line-height: 1;
  font-family: 'Material Symbols Outlined', var(--am-mono);
}
.am-drawer-nav { flex: 1; overflow-y: auto; padding: 10px 12px; }
.am-drawer-link {
  display: flex; align-items: center; gap: 12px; padding: 13px 12px; margin: 2px 0;
  border-radius: 10px; font-weight: 700; font-size: 15px; color: var(--am-text); text-decoration: none;
}
.am-drawer-link:hover, .am-drawer-link.is-active { background: #f5f3ff; color: var(--am-primary); }
.am-drawer-idx {
  font-family: var(--am-mono); font-size: 11px; font-weight: 600; color: var(--am-muted);
  border: 1px solid var(--am-border); border-radius: 6px; padding: 2px 6px; background: #f2f3ff;
}
.am-drawer-link.is-cta {
  justify-content: center; margin-top: 10px;
  background: linear-gradient(135deg, #7c3aed, #5300b7); color: #fff;
  box-shadow: 0 6px 18px rgba(83, 0, 183, .28);
}
.am-drawer-foot { padding: 14px 18px; border-top: 1px solid var(--am-border); }
.am-drawer-tag { font-family: var(--am-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--am-muted); }

/* ---- 窄屏页头收敛 ---- */
@media (max-width: 639px) {
  header a .flex.flex-col > span:last-child { display: none !important; }
}

/* ---- 组件基线: 评测横条 / 表格 ---- */
.benchmark-track { height: 6px; background: #f1f5f9; border-radius: 9999px; overflow: hidden; }
.benchmark-fill { height: 100%; background: linear-gradient(90deg, #7c3aed, #9333ea); border-radius: 9999px; }
.telemetry-chip {
  display: inline-flex; align-items: center; gap: .375rem; padding: .25rem .625rem;
  font-size: .75rem; font-family: var(--am-mono); font-weight: 600;
  border-radius: 4px; background: #f2f3ff; border: 1px solid var(--am-border);
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
