/* 竞彩情报站 · 设计令牌与组件（令牌表 = DESIGN-SYSTEM.md，一色一义/阶梯之外无字号） */
:root {
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --t1: 10px; --t2: 12px; --t3: 14px; --t4: 16px; --t5: 20px; --t6: 26px; --t7: 34px;
  --r1: 6px;  --r2: 10px; --r3: 14px; --r-full: 999px;
  --n0: #ffffff; --n1: #f7f8fa; --n2: #eef0f4; --n3: #d9dde4;
  --n4: #4b5563; --n5: #6b7280; --n6: #1c1f24;
  --win: #d92b2b; --draw: #c2740a; --lose: #12854a;
  --d1: #312e81; --d2: #4f46e5; --d3: #818cf8; --d4: #c7d2fe; --d5: #eef2ff;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--n1); color: var(--n6);
  font-size: var(--t3); font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.6;
}
.mono, .hero-num, .score { font-variant-numeric: tabular-nums; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }

/* ---- 布局 ---- */
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 var(--s4); }
.main { padding: var(--s5) var(--s4) var(--s7); }

/* ---- 顶栏 ---- */
.topbar { background: var(--n0); border-bottom: 1px solid var(--n3); position: sticky; top: 0; z-index: 10; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { font-weight: 700; font-size: var(--t4); display: flex; align-items: center; gap: var(--s2); }
.brand-mark {
  background: var(--win); color: var(--n0); width: 28px; height: 28px; border-radius: var(--r1);
  display: inline-flex; align-items: center; justify-content: center; font-size: var(--t4);
}
.nav { display: flex; gap: var(--s2); }
.nav a { padding: var(--s1) var(--s3); border-radius: var(--r-full); color: var(--n4); font-size: var(--t3); }
.nav a.on, .nav a:hover { background: var(--n2); color: var(--n6); font-weight: 600; }

/* ---- 卡片 ---- */
.card {
  background: var(--n0); border: 1px solid var(--n3); border-radius: var(--r2);
  padding: var(--s4); margin-bottom: var(--s5);
}
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s4); }
.page-title { font-size: var(--t5); font-weight: 700; margin: var(--s2) 0 var(--s4); }
.page-head { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; margin: var(--s2) 0 var(--s4); }

/* ---- 字号工具 ---- */
.t2 { font-size: var(--t2); } .t3 { font-size: var(--t3); } .t4 { font-size: var(--t4); font-weight: 600; }
.t5 { font-size: var(--t5); font-weight: 600; }
.t6 { font-size: var(--t6); font-weight: 700; }
.muted { color: var(--n5); }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }

/* ---- 语义色 ---- */
.c-win { color: var(--win); } .c-draw { color: var(--draw); } .c-lose { color: var(--lose); }

/* ---- 摘要与图表 ---- */
.summary-row { display: flex; gap: var(--s6); align-items: flex-end; margin: var(--s2) 0 var(--s3); flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: var(--s1); }
.stat-label { font-size: var(--t2); color: var(--n5); }
.hero-num { font-size: var(--t7); font-weight: 700; color: var(--win); line-height: 1.1; }
.hero-num small { font-size: var(--t5); font-weight: 600; }
.delta { font-size: var(--t2); }
.delta.up { color: var(--lose); } .delta.down { color: var(--win); }
.chart { height: 260px; width: 100%; }
.chart-card { padding: var(--s4); }

/* ---- 分段器 / 筛选 ---- */
.seg { display: inline-flex; background: var(--n2); border-radius: var(--r-full); padding: 2px; gap: 2px; }
.seg-item { padding: 3px var(--s3); border-radius: var(--r-full); font-size: var(--t2); color: var(--n4); }
.seg-item.on { background: var(--n0); color: var(--n6); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.filter-form select { border: 1px solid var(--n3); border-radius: var(--r1); padding: 4px var(--s2); font-size: var(--t2); background: var(--n0); }
.list-head { align-items: center; }

/* ---- 场次列表 ---- */
.day-block { margin-top: var(--s3); }
.day-head { display: flex; align-items: center; gap: var(--s2); font-size: var(--t2); color: var(--n5); margin: var(--s3) 0 var(--s1); }
.day-badge { background: var(--n6); color: var(--n0); border-radius: var(--r1); padding: 1px var(--s2); font-size: var(--t2); font-variant-numeric: tabular-nums; }
.match-row {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s4);
  padding: var(--s3) var(--s2); border-radius: var(--r2); flex-wrap: wrap;
}
.match-row:hover { background: var(--n1); }
.match-main { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.teams { font-size: var(--t3); font-weight: 600; }
.vs { color: var(--n5); font-weight: 400; font-size: var(--t2); padding: 0 2px; }
.match-metrics { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.metric { font-size: var(--t2); color: var(--n4); }
.metric b { font-variant-numeric: tabular-nums; }
.chip {
  background: var(--n2); border-radius: var(--r1); padding: 0 var(--s2);
  font-size: var(--t2); color: var(--n4); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.chip-dan { background: var(--win); color: var(--n0); }
.badge-diff { background: var(--win); color: var(--n0); border-radius: var(--r1); padding: 0 var(--s2); font-weight: 600; }
.empty { color: var(--n5); padding: var(--s5) 0; text-align: center; }

/* ---- 联赛 ---- */
.league-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--s3); }
.league-card { border: 1px solid var(--n3); border-radius: var(--r2); padding: var(--s3); display: flex; flex-direction: column; gap: var(--s1); }
.league-card:hover { border-color: var(--d3); background: var(--d5); }
.empty-leagues { margin-top: var(--s4); }

/* ---- 比赛详情 ---- */
.match-hero-top { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s4); }
.status-badge { border-radius: var(--r-full); padding: 1px var(--s2); font-size: var(--t2); background: var(--n2); color: var(--n4); }
.st-scheduled { background: var(--d5); color: var(--d1); }
.st-finished { background: var(--n2); }
.match-vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s4); padding: var(--s3) 0; }
.side { text-align: center; }
.team-name { font-size: var(--t6); font-weight: 700; }
.vs-mid { text-align: center; }
.vs .score { font-size: var(--t6); font-weight: 700; }
.market-block { border-top: 1px solid var(--n2); padding: var(--s3) 0; }
.market-title { margin-bottom: var(--s2); }
.odds-table { width: 100%; border-collapse: collapse; }
.odds-table th, .odds-table td { text-align: left; padding: var(--s1) var(--s2); border-bottom: 1px solid var(--n2); }
.odds-table thead th { font-size: var(--t2); color: var(--n5); background: var(--n2); }
.odds-table tbody th { font-weight: 600; white-space: nowrap; }
.support-row { display: flex; gap: var(--s5); flex-wrap: wrap; }
.sup-cell { display: flex; flex-direction: column; gap: 2px; }
.payload {
  background: var(--n1); border: 1px solid var(--n2); border-radius: var(--r1);
  padding: var(--s2) var(--s3); font-size: var(--t2); overflow-x: auto;
  font-family: ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-all;
  max-height: 320px; overflow-y: auto;
}

/* ---- 搜索 / 文案 ---- */
.search-form { display: flex; gap: var(--s2); margin-bottom: var(--s4); }
.search-form input { flex: 1; border: 1px solid var(--n3); border-radius: var(--r2); padding: var(--s2) var(--s3); font-size: var(--t3); }
.search-form button { border: 0; background: var(--d2); color: var(--n0); border-radius: var(--r2); padding: var(--s2) var(--s4); font-size: var(--t3); cursor: pointer; }
.team-list { line-height: 2.2; }
.prose p, .prose li { margin-bottom: var(--s2); }
.prose h2 { margin: var(--s4) 0 var(--s2); }
.prose a { color: var(--d2); }
.prose ul, .prose ol { padding-left: var(--s5); margin: var(--s2) 0; }

/* ---- 首页比分区（表格布局；字号参照雷速列表：主信息 16px / 辅助 12px / 组头 14px）---- */
.t1 { font-size: var(--t1); }
.ta-r { text-align: right; }
.ta-c { text-align: center; }
.ta-l { text-align: left; }
.board-tabs { margin-bottom: 0; }
.board-panel { margin-top: var(--s3); }
.stage-head {
  display: flex; align-items: center; gap: var(--s2);
  padding: var(--s2) var(--s1); font-size: var(--t3); font-weight: 600;
}
.stage-dot { width: 6px; height: 6px; border-radius: var(--r-full); background: var(--win); flex: none; }
.score-wrap { overflow-x: auto; }
.score-table { border-top: 1px solid var(--n2); min-width: 760px; }
.score-head {
  display: grid; grid-template-columns: 96px 116px 64px 1fr 80px 1fr 100px 100px;
  gap: var(--s2); padding: var(--s2); font-size: var(--t2); color: var(--n5);
  background: var(--n1);
}
.score-row {
  display: grid; grid-template-columns: 96px 116px 64px 1fr 80px 1fr 100px 100px;
  gap: var(--s2); align-items: center; padding: var(--s3) var(--s2);
  border-top: 1px solid var(--n2);
}
.score-row:first-of-type { border-top: 0; }
.score-row:hover { background: var(--n1); }
.cell-league { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.jc-no { font-style: normal; font-size: var(--t2); color: var(--n5); white-space: nowrap; }
.row-time { font-size: var(--t4); font-weight: 500; white-space: nowrap; }
.row-status { font-size: var(--t2); }
.st-live { font-weight: 600; }
.team-cell { font-size: var(--t4); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-cell { font-size: var(--t4); font-weight: 700; }
.row-metric { font-size: var(--t2); }
.board-foot { border-top: 1px solid var(--n2); margin-top: var(--s2); padding-top: var(--s2); text-align: center; }
.board-foot a:hover { color: var(--d2); }

/* ---- 资料库磁贴 ---- */
.lib-label { margin-bottom: var(--s3); }
.lib-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: var(--s3); }
.lib-tile {
  display: flex; flex-direction: column; align-items: center; gap: var(--s1);
  padding: var(--s3) var(--s1); border-radius: var(--r2); border: 1px solid transparent;
}
.lib-tile:hover { border-color: var(--n3); background: var(--n1); }
.lib-mark {
  width: 44px; height: 44px; border-radius: var(--r1); background: var(--n2);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: var(--t3);
}
.lib-count { font-size: var(--t1); }

/* ---- 足球积分榜 ---- */
button.seg-item { border: 0; cursor: pointer; font-family: inherit; }
.standings-panel { margin-top: var(--s3); }
.panel-meta { margin-bottom: var(--s2); }
.st-table { border: 1px solid var(--n2); border-radius: var(--r1); overflow: hidden; }
.st-head, .st-row {
  display: grid; grid-template-columns: 64px 1fr 72px;
  gap: var(--s2); padding: var(--s1) var(--s3); align-items: center;
}
.st-head { background: var(--n1); font-size: var(--t2); color: var(--n5); }
.st-row { border-top: 1px solid var(--n2); }
.st-rank { display: inline-flex; align-items: center; gap: var(--s1); color: var(--n5); }
.st-team { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zone-dot { display: inline-block; width: 4px; height: 14px; border-radius: var(--r-full); flex: none; }
.st-legend { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin-top: var(--s2); }
.st-legend span { display: inline-flex; align-items: center; gap: var(--s1); }

/* ---- 页脚 ---- */
.footer { border-top: 1px solid var(--n3); background: var(--n0); padding: var(--s4) 0 var(--s5); margin-top: var(--s6); }
.footer p { font-size: var(--t2); color: var(--n5); }
.footer a { color: var(--d2); }

@media (max-width: 720px) {
  .match-metrics { width: 100%; }
  .match-vs { grid-template-columns: 1fr; text-align: center; }
  .hero-num { font-size: var(--t6); }
}
