/* radar-site · 编辑部研报风
   三条原则：
   1. 纸是暖的、墨是黑的、红只用来指路；
   2. 分隔靠发丝线，不靠卡片、阴影、色块；
   3. 标题用宋体（刊头），数据用无衬线（读得准），两套字各司其职。 */

:root {
  --paper: #f7f4ed;
  --surface: #fffdf8;
  --ink: #17140f;
  --ink-2: #3d372e;
  --muted: #6d6457;
  --hair: #e2dbcb;
  --hair-2: #cec5b2;
  --accent: #9e2f26;
  --accent-deep: #7c241d;
  --tint: #f0e5de;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --serif: Georgia, "Songti SC", "Source Han Serif SC", "Noto Serif CJK SC",
           "SimSun", "Times New Roman", serif;
  --tabs-h: 0px;
  --maxw: 1140px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15.5px/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #fff8f2; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 58px 32px 24px;
}

/* ---------- 报头 ---------- */
.mast {
  border-top: 3px solid var(--ink);
  padding-top: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
}

.mast h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 5.4vw, 54px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: .06em;
  margin: 0;
  text-indent: -.02em;
}

.mast-dek {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .02em;
}

.mast-meta {
  margin: 0 0 4px;
  padding: 2px 0 2px 26px;
  border-left: 1px solid var(--hair);
  display: grid;
  gap: 9px;
  min-width: 168px;
}

.mast-meta div { display: flex; gap: 10px; align-items: baseline; }

.mast-meta dt {
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--muted);
  white-space: nowrap;
}

.mast-meta dd {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- 月份索引 ---------- */
.tabs {
  display: flex;
  gap: 0;
  margin: 40px 0 0;
  border-bottom: 1px solid var(--ink);
  overflow-x: auto;
  position: sticky;
  top: 0;
  z-index: 8;
  background: var(--paper);
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

body.has-tabs { --tabs-h: 69px; }

.tab {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-align: left;
  padding: 10px 26px 12px;
  cursor: pointer;
  white-space: nowrap;
  display: grid;
  gap: 2px;
  position: relative;
  transition: color .18s ease;
}

.tab + .tab { border-left: 1px solid var(--hair); }

.tab::after {
  content: "";
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .24s cubic-bezier(.16, 1, .3, 1);
}

.tab:hover { color: var(--ink); }

.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { transform: scaleX(1); }

.tab-period { display: flex; align-items: baseline; gap: 5px; }

.tab-y {
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--muted);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  line-height: 1;
  height: 26px;
}

.tab-m {
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
}

.tab-n {
  font-size: 11px;
  letter-spacing: .02em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.tab[aria-selected="true"] .tab-m { color: var(--accent); }
.tab[aria-selected="true"] .tab-n { color: var(--ink-2); }

.panel[hidden] { display: none; }

.panel.is-in { animation: panel-in .34s cubic-bezier(.16, 1, .3, 1) both; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 统计栏 ---------- */
.figures {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 38px 0 0;
  border-top: 1px solid var(--hair-2);
  border-bottom: 1px solid var(--ink);
}

.fig {
  padding: 17px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fig + .fig { border-left: 1px solid var(--hair); }

.fig:first-child { padding-left: 0; }
.fig:last-child { padding-right: 0; }

.fig-lab {
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--muted);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.fig-lab i {
  font-style: normal;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--muted);
}

.fig-num {
  font-size: 33px;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -.015em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.fig-amt .fig-num { color: var(--accent); }

/* ---------- 章节 ---------- */
.block { margin: 54px 0; }

.block.notes-wrap { margin-bottom: 40px; }

.sec {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 4px;
  padding-top: 12px;
  border-top: 1px solid var(--hair-2);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1.4;
}

.sec-note {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--muted);
  text-align: right;
}

/* ---------- 三句话 ---------- */
.judge {
  list-style: none;
  margin: 0;
  padding: 0;
}

.judge li {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 20px;
  padding: 19px 0 20px;
  border-bottom: 1px solid var(--hair);
}

.judge li:last-child { border-bottom: 0; padding-bottom: 4px; }

.judge-lab {
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--muted);
  padding-top: 6px;
}

.judge p {
  margin: 0;
  font-size: 16px;
  line-height: 1.95;
  color: var(--ink-2);
  max-width: 68ch;
}

.judge b {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  color: var(--ink);
}

.judge p b:first-of-type { color: var(--accent); }

/* ---------- 品牌榜 ---------- */
.brands-wrap { overflow-x: auto; }

table.rank {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-top: 10px;
}

table.rank th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--muted);
  border-bottom: 1px solid var(--ink);
  padding: 4px 9px 8px;
  white-space: nowrap;
}

table.rank th.num, table.rank th.rk { text-align: right; }

table.rank td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--hair);
  vertical-align: middle;
}

table.rank tbody tr { transition: background .14s ease; }
table.rank tbody tr:hover { background: var(--surface); }

td.rk {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  width: 34px;
}

table.rank td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink-2);
}

table.rank td.bname { white-space: nowrap; }

table.rank td.bname a {
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .14s ease, border-color .14s ease;
}

table.rank td.bname a:hover { color: var(--accent); border-bottom-color: var(--accent); }

td.bar-cell {
  position: relative;
  min-width: 198px;
  padding-bottom: 19px;
}

td.bar-cell .bar {
  position: absolute;
  left: 9px;
  bottom: 8px;
  height: 2px;
  background: var(--accent);
  opacity: .55;
  max-width: calc(100% - 18px);
}

td.bar-cell .amt {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

td.bar-cell .share {
  color: var(--muted);
  font-size: 11px;
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
}

td.model {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 230px;
}

.note, .empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
  margin: 12px 0 0;
}

/* 长榜单折叠 */
details.rank-more {
  margin-top: 14px;
  border-top: 1px dashed var(--hair-2);
  padding-top: 10px;
}

details.rank-more summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  list-style: none;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

details.rank-more summary::-webkit-details-marker { display: none; }

details.rank-more summary::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid currentColor;
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
  transition: transform .18s ease;
}

details.rank-more[open] summary::before { transform: rotate(90deg); }

details.rank-more summary:hover { color: var(--ink); }

details.rank-more table.rank { margin-top: 12px; }

/* ---------- 筛选器 ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  align-items: flex-end;
  margin: 14px 0 18px;
}

.flt { display: flex; flex-direction: column; gap: 5px; }

.flt-lab {
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--muted);
}

.flt select {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  border-bottom: 1px solid var(--hair-2);
  background-color: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  padding: 5px 24px 6px 0;
  border-radius: 0;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 9px) 55%, calc(100% - 4px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
  min-width: 128px;
  transition: border-color .16s ease;
}

.flt select:hover { border-bottom-color: var(--ink); }
.flt select:focus { outline: none; border-bottom-color: var(--accent); }
.flt select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.reset {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  padding: 6px 0 7px;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  letter-spacing: .02em;
  transition: color .16s ease, border-color .16s ease;
}

.reset:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- 明细表 ---------- */
.table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--ink);
  scrollbar-width: thin;
  scrollbar-color: var(--hair-2) transparent;
}

.table-wrap::-webkit-scrollbar { height: 9px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table-wrap::-webkit-scrollbar-thumb {
  background: var(--hair-2);
  border: 3px solid var(--paper);
  border-radius: 0;
}

table.rows {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 12.5px;
  white-space: nowrap;
}

/* 表头不做 sticky：.table-wrap 是横向滚动容器，sticky 的参照系会变成
   容器自己，表头会被钉进数据行中间——实测过，宁可让它随页面滚走。 */
table.rows th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .09em;
  color: var(--muted);
  padding: 11px 8px;
  border-bottom: 1px solid var(--hair-2);
  white-space: nowrap;
}

table.rows th.num { text-align: right; }

table.rows td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--hair);
  vertical-align: top;
  color: var(--ink-2);
}

table.rows tbody tr { transition: background .12s ease; }
table.rows tbody tr:hover { background: var(--surface); }

table.rows td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

table.rows td.c-project {
  white-space: normal;
  min-width: 168px;
  max-width: 236px;
}

table.rows td.c-item {
  white-space: normal;
  min-width: 88px;
  max-width: 118px;
}

/* 超长标的只给三行，全文进 title——一行数据不该有半屏高 */
table.rows td.c-item .clamp3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

table.rows tbody td.c-project a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--hair-2);
  transition: color .14s ease, border-color .14s ease;
}

table.rows tbody td.c-project a:hover { color: var(--accent); border-bottom-color: var(--accent); }

table.rows td.c-buyer {
  white-space: normal;
  min-width: 84px;
  max-width: 104px;
  color: var(--muted);
}

table.rows td.c-model {
  white-space: normal;
  min-width: 76px;
  max-width: 112px;
  color: var(--muted);
}

table.rows td.c-sup {
  white-space: normal;
  min-width: 88px;
  max-width: 120px;
}

table.rows td.c-brand { font-weight: 650; color: var(--ink); }

table.rows td.c-cat { padding-top: 8px; }

.chip {
  display: inline-block;
  font-size: 11px;
  line-height: 1.6;
  padding: 1px 6px;
  border: 1px solid var(--hair-2);
  color: var(--ink-2);
  letter-spacing: .02em;
  white-space: nowrap;
}

.chip-body {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--tint);
}

.count { color: var(--muted); font-weight: 400; }

.err { color: var(--accent); font-size: 12.5px; }

.more {
  display: block;
  margin: 20px auto 0;
  border: 1px solid var(--hair-2);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 12px;
  letter-spacing: .04em;
  padding: 9px 26px;
  border-radius: 0;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}

.more[hidden] { display: none; }

.more:hover { color: var(--accent); border-color: var(--accent); background: var(--surface); }

/* ---------- 数据说明 ---------- */
details.notes {
  border-top: 1px solid var(--hair-2);
  padding-top: 13px;
}

details.notes summary {
  cursor: pointer;
  font-size: 12.5px;
  letter-spacing: .03em;
  color: var(--muted);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 11px;
  user-select: none;
  transition: color .16s ease;
}

details.notes summary::-webkit-details-marker { display: none; }
details.notes summary:hover { color: var(--ink); }

.marker {
  position: relative;
  width: 11px;
  height: 11px;
  flex: none;
  border: 1px solid var(--hair-2);
}

.marker::before, .marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--ink-2);
  transform: translate(-50%, -50%);
}

.marker::before { width: 5px; height: 1px; }

.marker::after {
  width: 1px;
  height: 5px;
  transition: opacity .18s ease;
}

details.notes[open] .marker::after { opacity: 0; }
details.notes[open] summary { color: var(--ink); }

.notes-body { padding: 6px 0 4px; }

.notes-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-width: 84ch;
}

.notes-list li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px dotted var(--hair);
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--muted);
}

.notes-list li:last-child { border-bottom: 0; }

.notes-list b {
  color: var(--ink-2);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .04em;
}

.notes-list span b { color: var(--ink); font-size: inherit; letter-spacing: 0; }

/* ---------- 页脚 ---------- */
.foot {
  max-width: var(--maxw);
  margin: 26px auto 0;
  padding: 0 32px 56px;
}

.foot-in {
  border-top: 1px solid var(--ink);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
}

.foot-sig {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-2);
  letter-spacing: .02em;
}

.foot-sig span { color: var(--hair-2); margin: 0 4px; }

.foot .fine {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .01em;
  text-align: right;
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  main { padding: 40px 20px 16px; }
  .mast { grid-template-columns: 1fr; gap: 20px; align-items: start; }
  .mast-meta {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--hair);
    padding-top: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 18px;
  }
  .mast-meta div { flex-direction: column; gap: 1px; }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fig { padding: 14px 16px 16px; }
  .fig:nth-child(odd) { padding-left: 0; border-left: 0; }
  .fig:nth-child(even) { padding-right: 0; }
  .fig:nth-child(n + 3) { border-top: 1px solid var(--hair); }
  .fig-num { font-size: 28px; }
  .judge li { grid-template-columns: 1fr; gap: 4px; padding: 16px 0 18px; }
  .judge-lab { padding-top: 0; }
  .judge p { font-size: 15px; }
  .foot { padding: 0 20px 40px; }
  .foot-in { flex-direction: column; align-items: flex-start; gap: 8px; }
  .foot .fine { text-align: left; }
  .sec { flex-direction: column; gap: 3px; align-items: flex-start; }
  .sec-note { text-align: left; }
}

@media (max-width: 620px) {
  main { padding: 30px 16px 12px; }
  .mast { padding-top: 18px; }
  .mast h1 { letter-spacing: .04em; }
  .tabs { margin-top: 28px; }
  .tab { padding: 9px 16px 11px; }
  .tab::after { left: 16px; right: 16px; }
  .tab-m { font-size: 23px; }
  .block { margin: 42px 0; }
  .fig-lab { letter-spacing: .1em; }
  .flt { flex: 1 1 44%; }
  .flt select { min-width: 0; width: 100%; }
  .reset { flex: 1 1 100%; text-align: left; }
  .notes-list li { grid-template-columns: 1fr; gap: 2px; }
  .foot { padding: 0 16px 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* 样品页：单独转发时保留返回入口 */
a.back{display:inline-block;margin:18px 0 0;font:12px/1.6 var(--sans);color:var(--muted);text-decoration:none;border-bottom:1px solid var(--hair)}
a.back:hover{color:var(--accent);border-bottom-color:var(--accent)}

/* 子站轻壳导航：放在 mast 内，不加全局 sticky 条 */
.mast-nav{grid-column:1 / -1;display:flex;flex-wrap:wrap;gap:6px 18px;align-items:baseline;font:12px/1.6 var(--sans)}
.mast-nav a{color:var(--muted);text-decoration:none;border-bottom:1px solid var(--hair)}
.mast-nav a:hover{color:var(--accent);border-bottom-color:var(--accent)}
.mast-nav [aria-current="page"]{color:var(--ink);font-weight:600}

/* 快照口径说明：mast 内整行，沿用 .note 字色与字号 */
.mast-note{grid-column:1 / -1;margin-top:0}
