/* ============================================================
   modelpricing.yuzhonghai.cloud
   设计基线：Silicon Index 的纸感红金体系 + AA 的数据图气质
   ============================================================ */

:root {
  --red: #640000;
  --red-b: #8a1a1a;
  --gold: #a6813f;
  --gold-b: #c9a86a;
  --paper: #f7f3ec;
  --card: #ffffff;
  --card2: #fbf7f0;
  --line: rgba(100, 0, 0, .12);
  --line2: rgba(100, 0, 0, .06);
  --text: #241c17;
  --muted: #7a6b58;
  --green: #2f6f4e;
  --shadow: 0 1px 3px rgba(100, 0, 0, .05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--paper);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.2px;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 40px 24px 72px; }

/* ---------- 顶栏 ---------- */
header.top { border-bottom: 2px solid var(--red); padding-bottom: 20px; }
.kick { font-size: 11px; letter-spacing: 4px; color: var(--gold); text-transform: uppercase; font-weight: 600; }
h1 {
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(25px, 3.4vw, 34px); font-weight: 700;
  letter-spacing: .4px; margin: 9px 0 5px; color: var(--red);
}
.sub { color: var(--muted); font-size: 13.5px; }
.sub b { color: var(--gold); font-weight: 600; }
.sub .sep { margin: 0 8px; color: var(--line); }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-top: 16px;
}
.status { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(47, 111, 78, .12); }
.dot.stale { background: #b45309; box-shadow: 0 0 0 3px rgba(180, 83, 9, .12); }
.dot.fail { background: #b91c1c; box-shadow: 0 0 0 3px rgba(185, 28, 28, .12); }

/* ---------- 通用控件 ---------- */
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; box-shadow: var(--shadow); }
.seg button {
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 12.5px; font-weight: 600; letter-spacing: .3px; color: var(--muted);
  padding: 6px 13px; border-radius: 7px; transition: all .18s;
}
.seg button.on { background: linear-gradient(135deg, var(--red), var(--red-b)); color: #fff; box-shadow: 0 2px 7px rgba(100, 0, 0, .22); }
.seg button:hover:not(.on) { color: var(--red); }

.tabs { display: flex; gap: 4px; margin: 22px 0 0; border-bottom: 1px solid var(--line); }
.tabs button {
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 14px; font-weight: 600; color: var(--muted); padding: 10px 16px 12px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all .18s;
}
.tabs button.on { color: var(--red); border-bottom-color: var(--red); }
.tabs button:hover:not(.on) { color: var(--red); }

.view { display: none; }
.view.on { display: block; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* ---------- 图区 ---------- */
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; box-shadow: var(--shadow); margin-top: 20px;
}
.panel-title { font-size: 13px; font-weight: 700; color: var(--red); letter-spacing: .4px; }
.panel-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }

.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  background: var(--card2); border: 1px solid var(--line); border-radius: 8px;
  font-family: inherit; font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 5px 11px; cursor: pointer; transition: all .16s;
}
.pill:hover { border-color: var(--gold); color: var(--red); }
.pill.on { background: var(--red); border-color: var(--red); color: #fff; }
.pill .n { opacity: .6; font-weight: 400; margin-left: 4px; font-size: 11px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card2); border: 1px solid var(--line); border-radius: 20px;
  font-family: inherit; font-size: 12px; color: var(--text); padding: 4px 11px 4px 8px;
  cursor: pointer; transition: all .16s; opacity: .45;
}
.chip.on { opacity: 1; background: #fff; box-shadow: var(--shadow); }
.chip:hover { border-color: var(--gold); }
.chip i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.chip .c { color: var(--muted); font-size: 11px; }

input[type="search"], input[type="number"], select {
  font-family: inherit; font-size: 12.5px; color: var(--text);
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 10px; outline: none; transition: border-color .16s;
}
input:focus, select:focus { border-color: var(--gold); }
input[type="search"] { min-width: 190px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; }

#chart { width: 100%; height: 600px; }
#chart.tall { height: 620px; }

.chart-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.6; }
.hint b { color: var(--red); }
.frontier-list { display: flex; gap: 8px; flex-wrap: wrap; }
.fchip {
  display: inline-flex; align-items: center; gap: 7px; background: var(--card2);
  border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: 12px;
}
.fchip i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.fchip .v { color: var(--muted); font-size: 11px; }

/* ---------- 数据表 ---------- */
.table-wrap { overflow: auto; max-height: 620px; border: 1px solid var(--line2); border-radius: 10px; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  position: sticky; top: 0; z-index: 2; background: var(--card2);
  text-align: right; font-size: 11.5px; font-weight: 700; color: var(--gold);
  letter-spacing: .4px; padding: 9px 11px; border-bottom: 2px solid var(--line);
  white-space: nowrap; cursor: pointer; user-select: none; text-transform: uppercase;
}
thead th:first-child, tbody td:first-child { text-align: left; }
thead th.sorted { color: var(--red); }
thead th .arrow { opacity: .5; font-size: 10px; margin-left: 3px; }
tbody td { padding: 8px 11px; border-bottom: 1px solid var(--line2); text-align: right; white-space: nowrap; }
tbody tr:hover td { background: rgba(100, 0, 0, .028); }
tbody td.left { text-align: left; }
.vdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: 1px; }
.tag {
  display: inline-block; font-size: 10.5px; padding: 1px 6px; border-radius: 5px;
  border: 1px solid var(--line); color: var(--muted); margin-left: 5px; white-space: nowrap;
}
.tag.api { border-color: rgba(44, 111, 181, .35); color: #2c6fb5; }
.tag.tp { border-color: rgba(180, 83, 9, .35); color: #b45309; }
.tag.sup { border-color: rgba(122, 107, 88, .3); color: var(--muted); }
.conf-high { color: var(--green); font-weight: 600; }
.conf-medium { color: var(--gold); }
.conf-low { color: #b45309; }
.empty { text-align: center; color: var(--muted); padding: 30px; }

/* ---------- 方法页 ---------- */
.prose { max-width: 860px; }
.prose h2 {
  font-family: Georgia, "Songti SC", serif; font-size: 19px; color: var(--red);
  margin: 30px 0 10px; letter-spacing: .3px;
}
.prose h2:first-child { margin-top: 8px; }
.prose h3 { font-size: 14.5px; color: var(--text); margin: 18px 0 6px; }
.prose p { font-size: 14px; line-height: 1.85; color: #3a2e26; margin: 8px 0; }
.prose ul { margin: 8px 0 8px 20px; }
.prose li { font-size: 13.5px; line-height: 1.8; color: #3a2e26; margin: 4px 0; }
.prose code { font-family: "SF Mono", ui-monospace, monospace; font-size: 12.5px; background: rgba(100, 0, 0, .05); padding: 1px 5px; border-radius: 4px; }
.prose a { color: var(--red); text-decoration: none; border-bottom: 1px solid rgba(100, 0, 0, .25); }
.prose a:hover { border-bottom-color: var(--red); }
.prose .note-box {
  background: var(--card2); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 10px; padding: 14px 18px; margin: 16px 0; font-size: 13.5px; color: #4a3b30;
}
.prose table { font-size: 13px; margin: 12px 0; }
.prose table th, .prose table td { text-align: left; padding: 7px 10px; }
.prose table th { color: var(--gold); border-bottom: 2px solid var(--line); position: static; }
.prose table td { border-bottom: 1px solid var(--line2); }
.quote {
  border-left: 3px solid var(--red); background: var(--card2); border-radius: 8px;
  padding: 12px 16px; margin: 14px 0; font-size: 13px; color: #4a3b30;
}

/* ---------- 页脚 ---------- */
footer {
  border-top: 1px solid var(--line); margin-top: 48px; padding-top: 20px;
  color: var(--muted); font-size: 12px; line-height: 1.8;
}
footer .row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--red); text-decoration: none; }
footer .dotsep { margin: 0 8px; color: var(--line); }

/* ---------- 详情浮层 ---------- */
#detail {
  position: fixed; right: 24px; bottom: 24px; width: 340px; max-width: calc(100vw - 48px);
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(100, 0, 0, .16); padding: 16px 18px; z-index: 40;
  display: none; font-size: 12.5px;
}
#detail.on { display: block; }
#detail .close { position: absolute; top: 9px; right: 12px; cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1; }
#detail h4 { font-size: 14px; color: var(--red); margin-bottom: 2px; padding-right: 18px; }
#detail .plan { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
#detail dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12px; }
#detail dt { color: var(--muted); }
#detail dd { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
  .wrap { padding: 24px 14px 48px; }
  #chart { height: 460px; }
  .topbar { gap: 10px; }
  .tabs button { padding: 8px 10px 10px; font-size: 13px; }
  .panel { padding: 14px; }
  #detail { right: 8px; bottom: 8px; width: calc(100vw - 16px); }
}