/**
 * styles.css — 审码 Shenma 设计系统
 *
 * 风格：大厂风 + 高级感（Minimalism & Swiss）。单一强调色墨蓝 #1f4fd8，
 * 只用在主行动、选中态与唯一关键数字；其余一律中性色阶 + 发丝线。
 * 系统字体栈（不拉 Google Fonts）；圆角：卡片 12、控件 8；
 * 间距 4px 刻度；动效 150–250ms，只做解释性变化，尊重减动效偏好。
 * 断点（验收逐宽核对）：320 / 390 / 768 / 834 / 1024 / 1280 / 1440。
 */
:root {
  --accent: #1f4fd8;
  --accent-ink: #173a9e;
  --accent-soft: #eef3fe;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --info: #0369a1;
  --info-soft: #f0f9ff;
  --ok: #15803d;
  --ok-soft: #f0fdf4;
  --radius-card: 12px;
  --radius-control: 8px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --content: 1080px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; margin: 0; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding-left: 20px; }
code, pre { font-family: var(--mono); font-size: 13px; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* 跳过链接：Tab 第一个到达 */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--text); color: #fff; padding: 8px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; color: #fff; text-decoration: none; }

.wrap { max-width: var(--content); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--content); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 16px; min-height: 56px;
}
.brand { display: flex; align-items: baseline; gap: 8px; color: var(--text); font-weight: 600; font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand .brand-en { font-size: 12px; color: var(--text-3); font-weight: 400; letter-spacing: .04em; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 600;
  align-self: center;
}
.nav { display: flex; gap: 4px; margin-left: 8px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: var(--text-2); font-size: 14px; padding: 8px 10px; border-radius: 8px;
  white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.nav a.active { color: var(--accent); background: var(--accent-soft); font-weight: 500; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lang-switch { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.lang-switch button {
  border: 0; background: #fff; padding: 6px 10px; font-size: 13px; cursor: pointer; color: var(--text-2);
}
.lang-switch button.active { background: var(--text); color: #fff; }
.menu-btn { display: none; }

/* ---------- 按钮（全站一套） ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: var(--radius-control);
  border: 1px solid transparent; font-size: 15px; font-weight: 500; cursor: pointer;
  background: var(--accent); color: #fff; text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, transform 120ms ease;
}
.btn:hover { background: var(--accent-ink); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn.secondary { background: #fff; color: var(--text); border-color: var(--border-strong); }
.btn.secondary:hover { background: var(--bg-soft); }
.btn.ghost { background: transparent; color: var(--accent); padding: 8px 12px; min-height: 36px; }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.danger { background: #fff; color: var(--danger); border-color: #fecaca; }
.btn.danger:hover { background: var(--danger-soft); }
.btn:disabled, .btn.disabled {
  background: #f1f5f9; color: var(--text-3); border-color: var(--border);
  cursor: not-allowed; transform: none;
}
.btn.block { width: 100%; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.field .hint { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.field .error { font-size: 13px; color: var(--danger); margin-top: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; font-size: 15px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-control);
  background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input:disabled, select:disabled { background: var(--bg-soft); color: var(--text-3); }

/* ---------- 卡片与区块（全站一套） ---------- */
.card {
  border: 1px solid var(--border); border-radius: var(--radius-card);
  background: #fff; padding: 20px; margin-bottom: 16px;
}
.card h2 { font-size: 17px; margin-bottom: 8px; }
.card h3 { font-size: 15px; margin-bottom: 6px; }
.section { padding: 40px 0; }
.section-title { font-size: 24px; margin-bottom: 8px; }
.section-sub { color: var(--text-2); margin-bottom: 24px; max-width: 640px; }
.kicker { font-size: 13px; color: var(--accent); font-weight: 600; margin-bottom: 8px; }

/* ---------- 首页 hero ---------- */
.hero { padding: 64px 0 40px; }
.hero h1 { font-size: 40px; letter-spacing: -.01em; max-width: 640px; }
.hero .sub { font-size: 17px; color: var(--text-2); margin: 16px 0 24px; max-width: 640px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-free { margin-top: 16px; font-size: 14px; color: var(--text-2); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px; }
.step .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 14px;
  margin-bottom: 12px;
}
.step h3 { font-size: 15px; margin-bottom: 4px; }
.step p { font-size: 14px; color: var(--text-2); }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ---------- 定价表 ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; align-items: stretch; }
.plan {
  border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 20px; display: flex; flex-direction: column; background: #fff;
}
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan h3 { font-size: 16px; }
.plan .price { font-size: 28px; font-weight: 600; margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.plan .price .per { font-size: 14px; font-weight: 400; color: var(--text-2); }
.plan dl { margin: 12px 0; display: grid; gap: 8px; font-size: 14px; }
.plan dl div { display: flex; justify-content: space-between; gap: 12px; }
.plan dl dt { color: var(--text-2); }
.plan dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.plan .btn { margin-top: auto; }
.plan .tag {
  display: inline-block; font-size: 12px; color: var(--accent);
  background: var(--accent-soft); border-radius: 6px; padding: 2px 8px; margin-bottom: 8px;
}
.note-box {
  border: 1px solid #fecaca; background: var(--danger-soft);
  border-radius: var(--radius-card); padding: 16px 20px; margin: 16px 0;
}
.note-box h3 { color: var(--danger); font-size: 15px; margin-bottom: 4px; }
.note-box p { font-size: 14px; }
.info-box {
  border: 1px solid var(--border); background: var(--bg-soft);
  border-radius: var(--radius-card); padding: 16px 20px; margin: 16px 0;
}
.info-box h3 { font-size: 15px; margin-bottom: 4px; }
.info-box p { font-size: 14px; color: var(--text-2); }
.faq details { border-bottom: 1px solid var(--border); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 500; font-size: 15px; }
.faq p { font-size: 14px; color: var(--text-2); margin-top: 8px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-card); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
table.data th, table.data td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data th { color: var(--text-2); font-weight: 500; font-size: 13px; background: var(--bg-soft); }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: var(--bg-soft); }

/* ---------- 状态与级别标签 ---------- */
.badge {
  display: inline-block; font-size: 12px; font-weight: 500; line-height: 1;
  padding: 4px 8px; border-radius: 6px; white-space: nowrap;
}
.badge.blocker { background: var(--danger-soft); color: var(--danger); }
.badge.major { background: var(--warn-soft); color: var(--warn); }
.badge.minor { background: var(--info-soft); color: var(--info); }
.badge.nitpick { background: var(--bg-soft); color: var(--text-2); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.neutral { background: var(--bg-soft); color: var(--text-2); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }

/* ---------- 评审报告 ---------- */
.report-head { border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px; margin-bottom: 16px; }
.report-head h1 { font-size: 22px; margin-bottom: 8px; }
.report-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--text-2); }
.report-meta b { color: var(--text); font-weight: 500; }
.verdict { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.verdict .label { font-size: 14px; color: var(--text-2); }
.verdict .value { font-size: 18px; font-weight: 600; }
.verdict .value.block { color: var(--danger); }
.verdict .value.fix { color: var(--warn); }
.verdict .value.pass { color: var(--ok); }
.finding { border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px; margin-bottom: 16px; }
.finding h3 { font-size: 16px; margin: 8px 0 4px; }
.finding .meta-line { font-size: 13px; color: var(--text-2); }
.finding h4 { font-size: 13px; color: var(--text-2); font-weight: 500; margin: 16px 0 4px; }
.finding p { font-size: 14px; }
.finding .actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
pre.diff {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px; overflow-x: auto; margin: 4px 0 0; white-space: pre;
}
pre.diff .add { color: var(--ok); }
pre.diff .del { color: var(--danger); }
pre.diff .ctx { color: var(--text-2); }
.evidence { font-family: var(--mono); font-size: 13px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; overflow-x: auto; margin: 4px 0 0; }
details.nitpick { border: 1px solid var(--border); border-radius: var(--radius-card); padding: 16px 20px; margin-bottom: 16px; }
details.nitpick summary { cursor: pointer; font-weight: 500; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-row .btn { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.filter-row .btn[aria-pressed="true"] { background: var(--text); color: #fff; }
.audit-card { border: 1px solid #fcd34d; background: var(--warn-soft); border-radius: var(--radius-card); padding: 20px; margin: 16px 0; }
.audit-card h3 { font-size: 15px; margin-bottom: 4px; }
.audit-card p { font-size: 14px; color: var(--text-2); margin-bottom: 12px; }

/* ---------- 空态 / 错误态 ---------- */
.empty-state, .error-state {
  border: 1px dashed var(--border-strong); border-radius: var(--radius-card);
  padding: 32px 20px; text-align: center; color: var(--text-2);
}
.empty-state h3, .error-state h3 { color: var(--text); font-size: 16px; margin-bottom: 4px; }
.empty-state p, .error-state p { font-size: 14px; margin-bottom: 16px; }
.skeleton { border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px; color: var(--text-3); }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 32px 0 48px; font-size: 13px; color: var(--text-2); }
.footer p { margin-bottom: 8px; }
.footer nav { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.footer nav a { color: var(--text-2); }

/* ---------- 工具类 ---------- */
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2 > * { min-width: 0; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tabs button {
  border: 0; background: none; padding: 10px 14px; font-size: 14px; cursor: pointer;
  color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }
.qr { width: 200px; height: 200px; border: 1px solid var(--border); border-radius: var(--radius-card); object-fit: contain; background: #fff; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--text); color: #fff; padding: 10px 16px; border-radius: 8px;
  font-size: 14px; z-index: 100; box-shadow: 0 4px 16px rgba(15, 23, 42, .2);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .plan-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 834px) {
  .hero h1 { font-size: 32px; }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .trust { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav {
    display: none; position: absolute; top: 56px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 8px 16px 16px; gap: 0;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; border-bottom: 1px solid var(--border); border-radius: 0; }
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 44px; min-height: 44px; border: 1px solid var(--border);
    background: #fff; border-radius: 8px; cursor: pointer; font-size: 15px;
  }
  .topbar-inner { position: relative; }
}
@media (max-width: 390px) {
  .wrap { padding: 0 16px; }
  .topbar-inner { padding: 0 16px; }
  .hero { padding: 40px 0 32px; }
  .hero h1 { font-size: 28px; }
  .hero .sub { font-size: 15px; }
  .section { padding: 32px 0; }
  .section-title { font-size: 20px; }
  .steps, .plan-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .hero-actions .btn { width: 100%; }
  .card { padding: 16px; }
  .finding { padding: 16px; }
  .report-meta { gap: 4px 16px; }
}
@media (max-width: 320px) {
  body { font-size: 15px; }
  .hero h1 { font-size: 25px; }
  .brand .brand-en { display: none; }
  .lang-switch button { padding: 6px 8px; }
}

/* 减动效偏好：一切静止 */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
