/* ============================================================
   探厂评估平台 · 设计语言复刻自 artificialanalysis.ai
   —— 纯白底 / 近黑文字 / 衬线大标题 / 灰胶囊按钮
   —— 洋红强调 #9B1F6B / 深洋红 #43003B / 浅灰边框 #E8E8E8
   —— 密集数据表格 + 小号大写表头 + 等宽数字 + 分类色条
   移动端优先；桌面 ≥720px 顶部胶囊导航 + 数据表格。
   ============================================================ */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f7f7;
  --line: #e8e8e8;
  --line-2: #f0f0f0;
  --text: #0a0a0a;
  --muted: #8a8a8a;
  --btn-bg: #e7e7e7;
  --accent: #9b1f6b;
  --accent-dark: #43003b;
  --accent-soft: #f8eef4;
  --ok: #1f7a3d;
  --warn: #b8860b;
  --danger: #c0392b;
  /* 五维度分类色（对标 AA 的 per-entity 色彩编码） */
  --c-compliance: #9b1f6b;
  --c-strength: #b8860b;
  --c-reputation: #1f7a3d;
  --c-innovation: #4657c8;
  --c-transparency: #a0522d;
  --radius: 12px;
  --radius-s: 8px;
  --maxw: 1140px;
  --tabbar-h: 58px;
  --serif: "Source Serif 4", Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  font-feature-settings: "tnum";
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.main { padding-bottom: calc(var(--tabbar-h) + 32px); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xsmall { font-size: 12px; }
.center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
a { color: inherit; text-decoration: none; }
h1, h2, .display { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
h1 { font-size: 34px; line-height: 1.2; margin: 10px 0 8px; }
h2 { font-size: 24px; margin: 0; }
h3 { font-family: var(--sans); font-size: 15px; font-weight: 600; margin: 0; }

/* 小号大写字距标签（AA 的 eyebrow 标签风格） */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-dark);
}
.eyebrow-gray { color: var(--muted); }

/* ---------- 顶栏：黑胶囊 logo + 灰胶囊导航 + 洋红 CTA ---------- */
.topbar { background: var(--bg); }
.topbar-inner { display: flex; align-items: center; gap: 14px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 999px;
  background: var(--text); color: #fff; font-size: 15px; font-family: var(--serif);
}
.brand-name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.topnav { display: none; gap: 6px; }
.topnav a {
  padding: 8px 16px; border-radius: 999px; font-size: 14px;
  color: var(--text); background: var(--btn-bg); transition: background .15s;
}
.topnav a:hover { background: #dcdcdc; }
.topnav a.active { background: var(--text); color: #fff; }
.topnav .nav-cta { background: var(--accent); color: #fff; }
.topnav .nav-cta:hover { background: var(--accent-dark); }

/* 移动端底部标签栏（保留导航能力，视觉同样扁平） */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex; background: var(--bg); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 6px; color: var(--muted); font-size: 11px;
}
.tabbar a.active { color: var(--accent); }
@media (min-width: 720px) {
  .topnav { display: flex; }
  .tabbar { display: none; }
  .main { padding-bottom: 32px; }
}

/* ---------- 卡片：白面 + 细边框 + 大圆角，无阴影 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

/* ---------- 首页 hero：编辑刊物风 ---------- */
.hero { margin-top: 20px; padding: 40px 20px 32px; text-align: center; }
.hero .eyebrow { display: block; margin-bottom: 14px; }
.hero h1 { font-size: 40px; margin: 0 0 12px; }
.hero .accent { color: var(--accent); }
.hero-sub { color: var(--muted); font-size: 16px; max-width: 560px; margin: 0 auto; }
.search { display: flex; gap: 8px; max-width: 520px; margin: 20px auto 0; }
.search input {
  flex: 1; min-width: 0; padding: 11px 18px; font-size: 15px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2);
  outline: none;
}
.search input:focus { border-color: var(--accent); background: #fff; }
.search button {
  padding: 11px 24px; border: none; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 14px; cursor: pointer;
}
.search button:hover { background: var(--accent-dark); }
.stats { display: flex; justify-content: center; gap: 44px; margin-top: 26px; }
.stat strong {
  font-family: var(--serif); font-size: 28px; font-weight: 400;
  font-variant-numeric: tabular-nums; display: block;
}
.stat span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

/* ---------- 工厂列表：桌面数据表格（AA 排行榜风格）/ 移动卡片 ---------- */
.list-wrap { margin-top: 20px; }
.card-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .card-grid { display: none; } }

.factory-card { display: block; transition: border-color .15s; }
.factory-card:hover { border-color: var(--text); }
.factory-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.factory-card-head h3 { font-family: var(--serif); font-size: 17px; font-weight: 500; }
.factory-card-scores {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2);
}
.mini-score { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mini-score-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.mini-score-value { font-family: var(--serif); font-size: 20px; font-variant-numeric: tabular-nums; }

/* 数据表格 */
.table-card { display: none; }
@media (min-width: 720px) { .table-card { display: block; } }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { font-variant-numeric: tabular-nums; font-weight: 600; }
.table .factory-name { font-weight: 600; }
.table .factory-region { color: var(--muted); font-size: 12px; }

/* 指数列：彩色数字 + 迷你条 */
.idx-cell { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.idx-num { font-family: var(--serif); font-size: 17px; font-variant-numeric: tabular-nums; min-width: 44px; }
.idx-bar { height: 5px; width: 72px; border-radius: 999px; background: #f0f0f0; overflow: hidden; }
.idx-bar > div { height: 100%; border-radius: 999px; background: var(--accent); }

/* ---------- 页面头部 ---------- */
.page-head { margin: 20px 0 14px; }
.back { font-size: 13px; color: var(--muted); }
.back:hover { color: var(--accent); }
.page-head h1 { margin: 8px 0 4px; }

/* ---------- 区块与分数 ---------- */
.section { margin-bottom: 14px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.section-head h2 { font-size: 22px; }

.score-hero { display: flex; align-items: center; gap: 22px; margin-bottom: 16px; }
.score-big {
  font-family: var(--serif); font-size: 56px; font-weight: 400; line-height: 1;
  font-variant-numeric: tabular-nums; min-width: 120px; text-align: center;
}
.score-meta .eyebrow { display: block; margin-bottom: 4px; }
.score-meta p { margin: 0 0 4px; }

.dim-list { display: grid; gap: 14px; }
@media (min-width: 720px) { .dim-list { grid-template-columns: 1fr 1fr; gap: 12px 28px; } }
.dim-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.dim-name { font-size: 13px; font-weight: 600; }
.dim-dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.dim-value { margin-left: auto; font-family: var(--serif); font-size: 16px; font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 999px; background: #f0f0f0; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; }

/* 分类色（五维度固定色码） */
.c-compliance { color: var(--c-compliance); } .bg-compliance { background: var(--c-compliance); }
.c-strength { color: var(--c-strength); } .bg-strength { background: var(--c-strength); }
.c-reputation { color: var(--c-reputation); } .bg-reputation { background: var(--c-reputation); }
.c-innovation { color: var(--c-innovation); } .bg-innovation { background: var(--c-innovation); }
.c-transparency { color: var(--c-transparency); } .bg-transparency { background: var(--c-transparency); }

/* 分数色调 */
.tone-ok { color: var(--ok); }
.tone-warn { color: var(--warn); }
.tone-danger { color: var(--danger); }
.tone-muted { color: var(--muted); }
.tone-bg-ok { background: var(--ok); }
.tone-bg-warn { background: var(--warn); }
.tone-bg-danger { background: var(--danger); }

/* ---------- 胶囊 chip / 提示框 ---------- */
.chip {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: 12px; background: var(--btn-bg); color: var(--text);
  white-space: nowrap;
}
.chip-outline { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.chip-accent { background: var(--accent-soft); color: var(--accent-dark); }
.chip-ok { background: #e8f3ec; color: var(--ok); }
.chip-warn { background: #f7efd9; color: var(--warn); }

.notice {
  border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 14px 16px; margin-bottom: 12px; font-size: 13px;
}
.notice p { margin: 4px 0 0; }
.notice-warn { background: #fdf9ef; border-color: #ecdcae; }
.notice-disclosure { background: var(--accent-soft); border-color: #e5c9da; }
.notice-disclosure strong { font-family: var(--serif); font-size: 15px; color: var(--accent-dark); }

/* ---------- 审计列表 / 证据 / 方法论 ---------- */
.audit-list { display: grid; gap: 10px; }
.audit-item { display: block; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: var(--radius-s); }
.audit-item:hover { border-color: var(--text); }
.audit-item-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.audit-item-head strong { font-family: var(--serif); font-weight: 500; font-size: 16px; }
.audit-item p { margin: 2px 0 0; }

.evidence-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.evidence-list li {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; padding: 8px 12px; background: var(--surface-2);
  border-radius: var(--radius-s);
}

.disclosure { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }

.rules { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; }

/* ---------- 文章（审计正文） ---------- */
.article { line-height: 1.8; }
.article h1 { font-size: 24px; }
.article h2 { font-size: 19px; margin: 26px 0 10px; color: var(--accent-dark); }
.article blockquote {
  margin: 10px 0; padding: 8px 16px; background: var(--surface-2);
  border-left: 3px solid var(--accent); border-radius: 0 var(--radius-s) var(--radius-s) 0;
  font-size: 13px;
}
.article p { margin: 10px 0; }

.empty { text-align: center; color: var(--muted); padding: 20px 0; }

.footer { padding: 28px 0; text-align: center; font-size: 12px; color: var(--muted); }
.footer p { margin: 3px 0; }
