/* ==========================================================================
   农价通 · 设计系统（浅色 · agri.cn 官网配色）
   主色取自中国农业农村信息网 agri.cn：橙 #f17600（官网使用频次最高）
   辅助色：农业绿 #1ea13c（官网同源）
   涨跌遵循国内惯例：涨为红、跌为绿
   ========================================================================== */

:root {
  /* —— 品牌色（agri.cn 官网实测取值）—— */
  --brand: #f17600;
  --brand-hi: #fa8c1f;
  --brand-deep: #cf6700;
  --brand-ink: #a85300;
  --brand-soft: #fff4e8;
  --brand-tint: #fffaf5;
  --brand-line: #ffd9ad;
  --brand-glow: rgba(241, 118, 0, .16);

  /* —— 辅助绿（官网 #1ea13c）—— */
  --green: #1ea13c;
  --green-soft: #eaf7ed;
  --green-line: #bfe6c8;

  /* —— 涨跌（国内惯例）—— */
  --up: #e0322a;
  --up-soft: #fdeceb;
  --down: #1ea13c;
  --down-soft: #eaf7ed;
  --flat: #8b929c;
  --flat-soft: #f2f3f5;

  /* —— 语义色 —— */
  --amber: #d98b00;
  --amber-hi: #a86b00;
  --amber-soft: #fff7e6;
  --clay: #c4553c;

  /* —— 文字 —— */
  --tx-0: #1f2329;
  --tx-1: #414750;
  --tx-2: #6b7280;
  --tx-3: #9aa1ab;

  /* —— 背景 / 边框 —— */
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-warm: #fffaf5;
  --card: #ffffff;
  --ink-850: #ffffff;
  --line: #e8eaed;
  --line-soft: #f1f2f5;

  /* —— 形状 —— */
  --radius: 10px;
  --radius-l: 14px;
  --radius-pill: 100px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 12px rgba(16, 24, 40, .05);
  --shadow-hi: 0 4px 10px var(--brand-glow), 0 12px 28px rgba(16, 24, 40, .10);
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "SF Mono", ui-monospace, Consolas, "Roboto Mono", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--tx-1);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; color: var(--tx-0); font-weight: 600; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }

button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }

img { max-width: 100%; display: block; }

::selection { background: var(--brand-glow); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d8dbe0; border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* ==========================================================================
   顶栏
   ========================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 11px 22px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-hi) 42%, var(--green) 100%);
}

.brand { display: flex; align-items: center; gap: 10px; flex: none; text-decoration: none; color: inherit; cursor: pointer; }
.brand:hover .brand-mark b { color: var(--brand-deep); }
.brand:hover .brand-sub { color: var(--tx-2); }
.brand:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: var(--radius-pill); }
/* 品牌锁定：LOGO「大纵观」+ 站点名「农价网」 */
.brand-mark {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 19px; font-weight: 800; letter-spacing: .5px;
}
.brand-mark .brand-sigil {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 7px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff; font-size: 13px; font-weight: 800; letter-spacing: 0;
  box-shadow: 0 2px 6px var(--brand-glow);
}
.brand-mark b { font-size: 19px; font-weight: 800; letter-spacing: 1px; color: var(--brand); }
.brand-mark i {
  font-style: normal; font-size: 15px; font-weight: 700; color: var(--tx-0);
  letter-spacing: .5px; padding-left: 8px; border-left: 1px solid var(--line);
}
.brand-sub { font-size: 11.5px; color: var(--tx-3); letter-spacing: .3px; }

.search-wrap {
  flex: 1; max-width: 460px; position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: 0 11px; height: 34px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.search-wrap:focus-within {
  background: var(--bg);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.search-wrap svg { color: var(--tx-3); flex: none; }
.search-wrap input {
  flex: 1; min-width: 0; border: none; background: none; outline: none;
  font: inherit; color: var(--tx-0);
}
.search-wrap input::placeholder { color: var(--tx-3); }
.kbd {
  flex: none; font-size: 10.5px; font-family: var(--mono); color: var(--tx-3);
  border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; line-height: 16px;
}

.top-meta { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.meta-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; font-size: 11.5px; color: var(--tx-2);
  background: var(--bg-soft); border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill); white-space: nowrap;
}
.meta-chip b { color: var(--tx-0); font-weight: 600; }

.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tx-3); flex: none; }
.dot.live { background: var(--green); box-shadow: 0 0 0 3px rgba(30, 161, 60, .16); }
.dot.stale { background: var(--amber); box-shadow: 0 0 0 3px rgba(217, 139, 0, .16); }

.tool {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; font-size: 12px; color: var(--tx-1);
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  transition: all .16s; white-space: nowrap;
}
.tool:hover { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }
.tool[aria-pressed="true"] {
  color: #fff; background: var(--brand); border-color: var(--brand);
  box-shadow: 0 2px 8px var(--brand-glow);
}

/* 演示横幅 */
.demo-flag {
  display: block; width: 100%;
  padding: 7px 14px; font-size: 12px; text-align: center;
  color: var(--amber-hi); background: var(--amber-soft);
  border-bottom: 1px solid #ffe2b0;
}
.demo-flag b { font-family: var(--mono); font-size: 11px; }

/* ==========================================================================
   行情跑马灯
   ========================================================================== */
.ticker {
  display: flex; align-items: stretch;
  background: var(--brand-tint);
  border-bottom: 1px solid var(--brand-line);
  overflow: hidden;
}
.ticker-label {
  flex: none; display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; font-size: 11.5px; font-weight: 600;
  color: #fff; background: var(--brand);
}
.ticker-view { flex: 1; overflow: hidden; position: relative; min-width: 0; }
.ticker-view::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 46px;
  background: linear-gradient(90deg, transparent, var(--brand-tint));
  pointer-events: none;
}
.ticker-track { display: flex; width: max-content; animation: tick 88s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tick {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 7px 15px; font-size: 12px; color: var(--tx-2);
  border-right: 1px solid rgba(255, 217, 173, .6);
  cursor: pointer; white-space: nowrap;
}
.tick:hover { background: rgba(255, 255, 255, .7); }
.tick-name { color: var(--tx-0); font-weight: 500; }
.tick-val { color: var(--tx-0); font-weight: 700; font-family: var(--mono); font-size: 12.5px; }
.tick-unit { font-size: 10px; color: var(--tx-3); }
.tick-hb { font-family: var(--mono); font-size: 11.5px; display: inline-flex; align-items: center; gap: 2px; }
.tick-hb svg { width: 8px; height: 8px; }

/* ==========================================================================
   主体布局
   ========================================================================== */
.shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  align-items: start;
}

.sidebar {
  position: sticky; top: 58px;
  max-height: calc(100vh - 58px);
  overflow-y: auto;
  padding: 18px 12px 26px;
  border-right: 1px solid var(--line);
  background: var(--bg-warm);
}
.nav-title {
  font-size: 11px; font-weight: 700; letter-spacing: 1.4px;
  color: var(--tx-3); text-transform: uppercase;
  padding: 0 10px 9px;
}
.nav { display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 8px;
  width: 100%; padding: 8px 10px; text-align: left;
  border-radius: var(--radius); border-left: 3px solid transparent;
  transition: background .15s, border-color .15s;
}
.nav-item:hover { background: #fff; }
.nav-item[aria-current="true"] {
  background: #fff; border-left-color: var(--brand);
  box-shadow: var(--shadow-xs);
}
.nav-item[aria-current="true"] .nav-name { color: var(--brand); font-weight: 600; }
.nav-ico { font-size: 14px; line-height: 1; text-align: center; }
.nav-name { font-size: 13px; color: var(--tx-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-meta { display: flex; align-items: center; gap: 6px; }
.nav-hb { font-size: 11px; font-family: var(--mono); }
.nav-count {
  font-size: 10.5px; color: var(--tx-3); font-family: var(--mono);
  background: var(--bg-soft); border-radius: 100px; padding: 0 6px; line-height: 16px;
}
.nav-item[aria-current="true"] .nav-count { background: var(--brand-soft); color: var(--brand); }

.nav-foot {
  margin: 20px 8px 0; padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11px; line-height: 1.8; color: var(--tx-3);
}
.nav-foot a { color: var(--tx-2); border-bottom: 1px dotted var(--line); }
.nav-foot a:hover { color: var(--brand); border-color: var(--brand); }

.main { padding: 22px 26px 80px; max-width: 1560px; }

/* ==========================================================================
   区块标题
   ========================================================================== */
.sec-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 14px;
}
.sec-head h2 {
  font-size: 15px; color: var(--tx-0);
  display: inline-flex; align-items: center; gap: 8px;
}
.sec-head h2::before {
  content: ""; width: 3px; height: 14px; border-radius: 2px;
  background: var(--brand);
}
.hint { font-size: 11.5px; color: var(--tx-3); }
.spacer { flex: 1; }

/* ==========================================================================
   品类头部
   ========================================================================== */
.cat-head {
  padding: 18px 20px 20px; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--brand-soft) 0%, #ffffff 62%);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-l);
}
.crumb { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--tx-3); margin-bottom: 9px; }
.crumb a { color: var(--tx-2); }
.crumb a:hover { color: var(--brand); }
.crumb .sep { color: var(--line); }

.cat-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.cat-title {
  font-size: clamp(19px, 2.3vw, 26px); font-weight: 700; color: var(--tx-0);
  letter-spacing: -.2px;
}
.cat-desc { margin: 0; font-size: 12.5px; color: var(--tx-2); line-height: 1.7; }

.cat-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.cat-stat {
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 15px; min-width: 106px;
  background: rgba(255, 255, 255, .86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.cat-stat .k { font-size: 10.5px; color: var(--tx-3); letter-spacing: .2px; }
.cat-stat .v { font-size: 18px; font-weight: 700; color: var(--tx-0); font-family: var(--mono); }

/* ==========================================================================
   产品卡（核心：产品 → 价格 → 群号 → 二维码）
   ========================================================================== */
.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 13px;
}

.gcard {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.gcard:hover {
  border-color: var(--brand-line);
  box-shadow: var(--shadow-hi);
  transform: translateY(-1px);
}

/* 卡片头：产品图 + 名称 + 价格 */
.gcard-top { display: flex; gap: 11px; padding: 13px 14px 0; align-items: flex-start; }

.gcard-thumb {
  flex: none; width: 54px; height: 54px; border-radius: var(--radius);
  overflow: hidden; background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.gcard-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gcard-thumb .emoji { font-size: 26px; line-height: 1; }
.gcard-thumb.empty::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, #fafbfc, #fafbfc 6px, #f3f5f7 6px, #f3f5f7 12px);
}

.gcard-head { flex: 1; min-width: 0; }
.gcard-name {
  font-size: 15px; font-weight: 700; color: var(--tx-0);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.gcard-name .tag {
  font-size: 10px; font-weight: 500; padding: 1px 6px; border-radius: 100px;
  color: var(--brand); background: var(--brand-soft); border: 1px solid var(--brand-line);
}
.gcard-alias {
  font-size: 11.5px; color: var(--tx-3); margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

/* 价格行 */
.gcard-price-row {
  display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap;
  margin-top: 9px;
}
.price-big {
  font-family: var(--mono); font-size: 23px; font-weight: 700; line-height: 1.1;
  letter-spacing: -.5px;
}
.price-big.up { color: var(--up); }
.price-big.down { color: var(--down); }
.price-big.flat { color: var(--tx-0); }
.price-unit { font-size: 11px; color: var(--tx-3); }
.price-none {
  font-size: 12px; color: var(--tx-3);
  display: inline-flex; align-items: center; gap: 5px;
}

/* 涨跌胶囊 */
.pill {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11.5px; font-family: var(--mono); font-weight: 600;
  padding: 2px 8px; border-radius: 100px; white-space: nowrap;
}
.pill svg { width: 8px; height: 8px; }
.pill.up { color: var(--up); background: var(--up-soft); }
.pill.down { color: var(--down); background: var(--down-soft); }
.pill.flat { color: var(--flat); background: var(--flat-soft); }

/* 群号块 */
.gcard-bottom {
  display: flex; align-items: center; gap: 11px;
  margin-top: 12px; padding: 11px 14px 12px;
  border-top: 1px dashed var(--line);
  background: var(--brand-tint);
}
.qr-slot {
  position: relative; flex: none; width: 68px; height: 68px;
  border-radius: var(--radius); overflow: hidden;
  background: #fff; border: 1px solid var(--brand-line);
  cursor: zoom-in; transition: box-shadow .18s, transform .18s;
}
.qr-slot:hover { box-shadow: 0 4px 12px var(--brand-glow); transform: scale(1.03); }
.qr-slot img { width: 100%; height: 100%; object-fit: contain; }
.qr-hint {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: 9px; text-align: center; color: #fff; background: rgba(241, 118, 0, .92);
  line-height: 13px;
}
.qr-slot .ph {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--tx-3); text-align: center;
}
.qr-slot .ph small { font-size: 9px; line-height: 1.2; }
.qr-slot.empty { background: var(--bg-soft); border-style: dashed; border-color: var(--line); cursor: help; }
.qr-slot.empty:hover { transform: none; box-shadow: none; }

.gno-wrap { flex: 1; min-width: 0; }
.gno-label { font-size: 10.5px; color: var(--tx-3); letter-spacing: .3px; }
.gno {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--brand);
  cursor: pointer; border-radius: 6px; padding: 1px 0;
  transition: color .15s;
}
.gno:hover { color: var(--brand-deep); }
.gno:hover .arrow { transform: translateX(2px); }
.gno .arrow { transition: transform .16s; }
.gno .val.none { color: var(--tx-3); font-size: 12px; font-weight: 500; font-family: var(--font); }
.gno-meta { font-size: 10.5px; color: var(--tx-3); margin-top: 3px; }

.copy-btn {
  flex: none; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: var(--tx-2); background: #fff; border: 1px solid var(--line);
  border-radius: 8px; transition: all .16s;
}
.copy-btn:hover { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }
.copy-btn.done { color: var(--green); border-color: var(--green-line); background: var(--green-soft); }

/* 覆盖品种 */
.gcard-covers {
  padding: 9px 14px 11px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px; color: var(--tx-3);
  display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline;
}
.gcard-covers .lb {
  flex: none; color: var(--tx-3);
  font-size: 10px; padding: 1px 6px; background: var(--bg-soft);
  border-radius: 100px; border: 1px solid var(--line-soft);
}
.gcard-covers .cv { color: var(--tx-2); line-height: 1.6; }
.gcard-covers .more { color: var(--brand); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; padding: 1px 7px; border-radius: 100px;
  color: var(--tx-2); background: var(--bg-soft); border: 1px solid var(--line-soft);
  white-space: nowrap;
}
.badge.ok { color: var(--green); background: var(--green-soft); border-color: var(--green-line); }
.badge.warn { color: var(--amber-hi); background: var(--amber-soft); border-color: #ffe2b0; }

/* 时效徽章 */
.fresh { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; }
.fresh .dot { width: 5px; height: 5px; }
.fresh b { font-family: var(--mono); font-weight: 600; }
.fresh-v { color: var(--green); }
.fresh-v .dot { background: var(--green); }
.recent-v { color: var(--brand); }
.recent-v .dot { background: var(--brand); }
.stale-v, .unknown-v { color: var(--amber-hi); }
.stale-v .dot, .unknown-v .dot { background: var(--amber); }

/* 空态 */
.empty-state {
  grid-column: 1 / -1;
  padding: 46px 20px; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--radius-l);
  background: var(--bg-soft);
}
.empty-state .ico { font-size: 30px; margin-bottom: 8px; }
.empty-state h3 { font-size: 14px; margin-bottom: 5px; }
.empty-state p { margin: 0; font-size: 12px; color: var(--tx-3); }

/* ==========================================================================
   数据表
   ========================================================================== */
.tbl-wrap {
  border: 1px solid var(--line); border-radius: var(--radius-l);
  overflow: hidden; background: var(--card);
}
.tbl-scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 640px; }
.tbl thead th {
  text-align: left; font-weight: 600; font-size: 11px; letter-spacing: .3px;
  color: var(--tx-2); background: var(--bg-soft);
  padding: 9px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td {
  padding: 9px 12px; border-bottom: 1px solid var(--line-soft);
  color: var(--tx-1); vertical-align: middle;
}
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover td { background: var(--brand-tint); }
.tbl .r { text-align: right; font-family: var(--mono); }
.tbl-name { color: var(--tx-0); font-weight: 500; }
.tbl-code { font-size: 10.5px; color: var(--tx-3); font-family: var(--mono); }

/* ==========================================================================
   采集状态面板
   ========================================================================== */
.prov-status {
  border: 1px solid var(--line); border-radius: var(--radius-l);
  background: var(--card); overflow: hidden;
}
.prov-status summary {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 15px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--tx-0);
  list-style: none;
}
.prov-status summary::-webkit-details-marker { display: none; }
.prov-status summary:hover { background: var(--bg-soft); }
.prov-status .chev { transition: transform .18s; color: var(--tx-3); }
.prov-status[open] .chev { transform: rotate(90deg); }
.prov-status .cnt { font-weight: 400; font-size: 11.5px; color: var(--tx-3); }
.prov-status .inner { padding: 0 12px 14px; }

/* ==========================================================================
   溯源 / 侧栏
   ========================================================================== */
.prov {
  padding: 15px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}
.prov h2 {
  font-size: 12.5px; margin-bottom: 11px;
  display: flex; align-items: center; gap: 7px;
}
.prov h2::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: var(--brand); }
.prov dl { margin: 0; display: grid; grid-template-columns: 84px 1fr; gap: 7px 12px; font-size: 11.5px; }
.prov dt { color: var(--tx-3); }
.prov dd { margin: 0; color: var(--tx-1); word-break: break-all; }
.prov dd a { color: var(--brand); }
.prov dd a:hover { text-decoration: underline; }

/* ==========================================================================
   详情页
   ========================================================================== */
.detail-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 306px;
  gap: 18px; align-items: start;
}
.side-stack { display: flex; flex-direction: column; gap: 13px; position: sticky; top: 66px; }

.quote-card {
  padding: 18px 20px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  border-top: 3px solid var(--brand);
}
.quote-card.up { border-top-color: var(--up); }
.quote-card.down { border-top-color: var(--down); }
.quote-card.flat { border-top-color: var(--flat); }
.qc-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.qc-name { font-size: 15px; font-weight: 700; color: var(--tx-0); }
.qc-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 12px 0 4px; }
.qc-value { font-family: var(--mono); font-size: 42px; font-weight: 700; line-height: 1.05; letter-spacing: -1.4px; }
.qc-value.up { color: var(--up); }
.qc-value.down { color: var(--down); }
.qc-value.flat { color: var(--tx-0); }
.qc-unit { font-size: 12.5px; color: var(--tx-3); }
.qc-delta { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; }
.qc-delta .big { font-family: var(--mono); font-size: 16px; font-weight: 600; }

.metric-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 1px; margin-top: 16px;
  background: var(--line-soft); border: 1px solid var(--line-soft);
  border-radius: var(--radius); overflow: hidden;
}
.metric { padding: 9px 12px; background: var(--card); }
.metric .k { font-size: 10.5px; color: var(--tx-3); }
.metric .v { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--tx-0); margin-top: 2px; }
.metric .v.txt { font-family: var(--font); font-size: 12.5px; font-weight: 500; }

.chart-card {
  padding: 15px 16px 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}
.chart-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.chart-head h2 { font-size: 12.5px; display: flex; align-items: center; gap: 7px; }
.chart-head h2::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: var(--brand); }
.spark { width: 100%; height: auto; display: block; }
.grid-line { stroke: var(--line-soft); stroke-width: 1; }
.axis-txt { fill: var(--tx-3); font-size: 10px; font-family: var(--mono); }

/* ==========================================================================
   覆盖品种（官方档案卡）
   ========================================================================== */
.variety-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 11px;
}
.vcard {
  display: flex; gap: 11px; padding: 11px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); transition: border-color .18s, box-shadow .18s;
}
.vcard:hover { border-color: var(--brand-line); box-shadow: var(--shadow); }
.vcard-thumb {
  flex: none; width: 62px; height: 62px; border-radius: 8px; overflow: hidden;
  background: var(--bg-soft); border: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: center;
}
.vcard-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vcard-thumb .emoji { font-size: 26px; }
.vcard-body { flex: 1; min-width: 0; }
.vcard-body h4 { font-size: 13.5px; color: var(--tx-0); margin-bottom: 2px; }
.vcard-alias { font-size: 11px; color: var(--brand); margin-bottom: 3px; }
.vcard-desc {
  margin: 0; font-size: 11px; line-height: 1.65; color: var(--tx-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.vcard-meta { font-size: 10px; color: var(--tx-3); margin-top: 5px; font-family: var(--mono); }

/* ==========================================================================
   弹窗 / 提示
   ========================================================================== */
.modal {
  position: fixed; inset: 0; z-index: 90;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(31, 35, 41, .42);
  backdrop-filter: blur(3px);
}
.modal.on { display: flex; }
.modal-card {
  width: 100%; max-width: 320px; padding: 20px;
  background: var(--card); border-radius: 18px;
  box-shadow: 0 20px 50px rgba(16, 24, 40, .22);
  text-align: center;
  animation: pop .18s ease-out;
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-card h3 { font-size: 15px; margin-bottom: 3px; }
.modal-card .sub { font-size: 11.5px; color: var(--tx-3); margin-bottom: 14px; }
.modal-qr {
  width: 190px; height: 190px; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--brand-line); border-radius: 12px;
  padding: 8px;
}
.modal-qr img { width: 100%; height: 100%; object-fit: contain; }
.modal-gno {
  font-family: var(--mono); font-size: 17px; font-weight: 700; color: var(--brand);
  margin-bottom: 6px;
}
.modal-close {
  margin-top: 14px; width: 100%; padding: 9px;
  font-size: 13px; color: #fff; background: var(--brand);
  border-radius: var(--radius); transition: background .16s;
}
.modal-close:hover { background: var(--brand-hi); }

#toast {
  position: fixed; left: 50%; bottom: 42px; z-index: 99;
  transform: translate(-50%, 14px);
  padding: 9px 18px; font-size: 12.5px; color: #fff;
  background: rgba(31, 35, 41, .92);
  border-radius: var(--radius-pill);
  opacity: 0; pointer-events: none; transition: all .22s;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   页脚
   ========================================================================== */
.foot {
  margin-top: 34px; padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--tx-3); line-height: 1.9;
}
.foot a { color: var(--tx-2); }
.foot a:hover { color: var(--brand); }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1180px) {
  .detail-hero { grid-template-columns: minmax(0, 1fr); }
  .side-stack { position: static; }
}
@media (max-width: 1100px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: static; max-height: none;
    border-right: none; border-bottom: 1px solid var(--line);
    padding: 12px 13px 10px;
  }
  .nav { flex-direction: row; gap: 7px; overflow-x: auto; padding-bottom: 4px; }
  .nav-item {
    flex: none; width: auto; grid-template-columns: auto auto auto;
    padding: 6px 12px; border-left: none;
    border: 1px solid var(--line); border-radius: 100px;
    background: #fff;
  }
  .nav-item[aria-current="true"] { border-color: var(--brand); background: var(--brand-soft); }
  .nav-title { display: none; }
  .nav-foot { display: none; }
  .main { padding: 16px 14px 66px; }
}
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 13px; }
  .search-wrap { order: 3; width: 100%; max-width: none; flex: 1 1 100%; }
  .top-meta { margin-left: 0; flex: 1; }
  .meta-chip { font-size: 10.5px; padding: 2px 8px; }
  .brand { gap: 8px; }
  .brand-mark { gap: 6px; }
  .brand-mark .brand-sigil { width: 21px; height: 21px; font-size: 12px; }
  .brand-mark b { font-size: 17px; }
  .brand-mark i { font-size: 13.5px; padding-left: 6px; }
  .brand-sub { display: none; }
  .cat-head { padding: 14px 15px 16px; }
  .group-grid { grid-template-columns: minmax(0, 1fr); }
  .qc-value { font-size: 34px; }
  .modal-qr { width: 158px; height: 158px; }
}

/* ==========================================================================
   站点导航链接（顶栏）
   ========================================================================== */
.top-links { display: flex; gap: 4px; }
.top-links a { padding: 5px 12px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 600; color: var(--tx-2); transition: all .15s ease; }
.top-links a:hover { color: var(--brand); background: var(--brand-soft); }
.top-links a.on { color: #fff; background: var(--brand); }

/* ==========================================================================
   通用页面骨架（news / analysis）
   ========================================================================== */
.page-wrap { max-width: 1180px; margin: 0 auto; padding: 26px 22px 60px; }
.page-hero { margin-bottom: 22px; }
.page-hero h1 { font-size: 22px; margin-bottom: 8px; }
.page-hero h1::after { content: ""; display: block; width: 44px; height: 3px; margin-top: 8px; border-radius: 2px; background: linear-gradient(90deg, var(--brand), var(--green)); }
.page-hero p { margin: 0; color: var(--tx-2); max-width: 860px; }
.page-hero p b { color: var(--tx-1); }
.sec-title { font-size: 15.5px; margin-bottom: 4px; }
.sec-sub { margin: 0 0 14px; font-size: 12px; color: var(--tx-3); }
.ana-sec { margin-bottom: 34px; }

/* ==========================================================================
   政策资讯页
   ========================================================================== */
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tag-chip { padding: 4px 13px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; color: var(--tx-2); background: var(--bg-soft); border: 1px solid var(--line); transition: all .15s ease; }
.tag-chip:hover { color: var(--brand); border-color: var(--brand-line); background: var(--brand-tint); }
.tag-chip.on { color: #fff; background: var(--brand); border-color: var(--brand); }
.tag-chip.static { cursor: default; background: var(--brand-soft); color: var(--brand-ink); border-color: var(--brand-line); padding: 2px 10px; }
.news-list { display: grid; gap: 14px; }
.news-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 18px 20px; box-shadow: var(--shadow-xs); transition: all .15s ease; }
.news-card:hover { box-shadow: var(--shadow-hi); border-color: var(--brand-line); transform: translateY(-1px); }
.news-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.news-date { font-size: 12px; color: var(--tx-3); font-family: var(--mono); }
.news-title { font-size: 15.5px; line-height: 1.5; margin: 0 0 8px; }
.news-title a:hover { color: var(--brand); }
.news-sum { margin: 0 0 12px; color: var(--tx-2); font-size: 13px; line-height: 1.7; }
.news-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.news-src { font-size: 12px; color: var(--tx-3); }
.news-link { font-size: 12.5px; font-weight: 600; color: var(--brand); white-space: nowrap; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--brand-soft); transition: all .15s ease; }
.news-link:hover { background: var(--brand); color: #fff; }
.empty-tip { color: var(--tx-3); text-align: center; padding: 40px 0; }
.ch-sec { margin-top: 40px; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ch-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; transition: all .15s ease; }
.ch-card:hover { border-color: var(--brand-line); box-shadow: var(--shadow); }
.ch-name { font-weight: 700; color: var(--tx-0); font-size: 13.5px; margin-bottom: 4px; }
.ch-card:hover .ch-name { color: var(--brand); }
.ch-desc { font-size: 12px; color: var(--tx-2); margin-bottom: 8px; }
.ch-url { font-size: 11px; color: var(--tx-3); font-family: var(--mono); word-break: break-all; }

/* ==========================================================================
   市场分析页
   ========================================================================== */
.ana-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ana-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 16px 18px; box-shadow: var(--shadow-xs); }
.ana-card.na { background: var(--bg-soft); border-style: dashed; }
.ana-card.na .na-tip { color: var(--tx-3); font-size: 12.5px; margin: 8px 0 0; }
.ana-card-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ana-card-hd h3 { font-size: 13.5px; }
.ana-card .big { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.big-val { font-size: 26px; font-weight: 700; color: var(--tx-0); font-family: var(--mono); letter-spacing: -.5px; }
.big-unit { font-size: 12px; color: var(--tx-3); }
.ana-card .sub { font-size: 12px; color: var(--tx-3); margin-bottom: 8px; }
.ana-card .src { font-size: 11.5px; color: var(--tx-3); border-top: 1px dashed var(--line-soft); padding-top: 8px; }
.ana-card .src a { color: var(--tx-2); text-decoration: underline dotted; }
.ana-card .src a:hover { color: var(--brand); }
.spark-box { margin: 4px 0 10px; }
.spark-box svg { width: 100%; height: auto; display: block; }
.tbl-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 6px 14px 12px; overflow-x: auto; box-shadow: var(--shadow-xs); }
.tbl-cap { font-size: 13px; padding: 10px 2px 6px; }
.tbl-cap.up-cap { color: var(--up); }
.tbl-cap.down-cap { color: var(--down); }
.ana-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ana-tbl th { text-align: left; color: var(--tx-3); font-weight: 600; font-size: 11.5px; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ana-tbl td { padding: 9px 8px; border-bottom: 1px solid var(--line-soft); color: var(--tx-1); }
.ana-tbl tr:last-child td { border-bottom: none; }
.ana-tbl .r { text-align: right; }
.ana-tbl .unit { margin-left: 3px; font-size: 11px; color: var(--tx-3); }
.rank-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .rank-cols { grid-template-columns: 1fr; } .top-links { display: none; } }
.pt-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.pt-list li { color: var(--tx-1); line-height: 1.7; }
.pt-list li::marker { color: var(--brand); }
.disclaimer { margin: 16px 0 0; font-size: 12px; color: var(--tx-3); background: var(--bg-soft); border: 1px dashed var(--line); border-radius: var(--radius); padding: 12px 14px; line-height: 1.7; }